From d354dc3d893c23049f5a5c315c6e8edfb4355868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Tue, 19 Aug 2025 10:30:34 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/czg/app/controller/CashController.php | 9 +++++++-- config/think-cache.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/czg/app/controller/CashController.php b/app/czg/app/controller/CashController.php index a4a2abf..ed3ed72 100644 --- a/app/czg/app/controller/CashController.php +++ b/app/czg/app/controller/CashController.php @@ -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); }); diff --git a/config/think-cache.php b/config/think-cache.php index 27b570a..16a8ef7 100644 --- a/config/think-cache.php +++ b/config/think-cache.php @@ -18,7 +18,7 @@ return [ // Thinkphp官方没有这个参数,由于生成的tag键默认不过期,如果tag键数量很大,避免长时间占用内存,可以设置一个超过其他缓存的过期时间,0为不设置 'tag_expire' => 86400 * 30, // 缓存标签前缀 - 'tag_prefix' => 'tag:', + 'tag_prefix' => '', // 连接池配置 'pool' => [ 'max_connections' => 5, // 最大连接数