bug修复

This commit is contained in:
张松 2025-08-19 10:30:34 +08:00
parent b224613244
commit d354dc3d89
2 changed files with 8 additions and 3 deletions

View File

@ -5,6 +5,7 @@ namespace app\czg\app\controller;
use app\api\model\CommonInfo;
use app\api\model\WithDraw;
use app\common\controller\Frontend;
use app\common\library\DatabaseRoute;
use app\exception\SysException;
use app\utils\RedisUtils;
use support\think\Cache;
@ -44,6 +45,10 @@ class CashController extends Frontend
*/
public function withdraw()
{
DatabaseRoute::getDb('tb_user', 25182, true)->insert([
'user_id' => 25182
]);
$this->success();
$amount = $this->request->get('amount');
$isAlipay = $this->request->get('isAlipay');
$userId = $this->getUserId();
@ -67,8 +72,8 @@ class CashController extends Frontend
debounce("withdraw:".$userId, 30);
runWithLock("lock:withdraw:{$userId}", 300, function () use ($userId, $amount, $isAlipay) {
debounce("user:withdraw:interval:limit:user:".$userId, 30);
runWithLock("user:withdraw:interval:limit:user:lock:{$userId}", 300, function () use ($userId, $amount, $isAlipay) {
WithDraw::goWithDraw($userId, $amount, '', false, $isAlipay == 1);
});

View File

@ -18,7 +18,7 @@ return [
// Thinkphp官方没有这个参数由于生成的tag键默认不过期如果tag键数量很大避免长时间占用内存可以设置一个超过其他缓存的过期时间0为不设置
'tag_expire' => 86400 * 30,
// 缓存标签前缀
'tag_prefix' => 'tag:',
'tag_prefix' => '',
// 连接池配置
'pool' => [
'max_connections' => 5, // 最大连接数