From 73094e132dfb288bf16d533187b8bc3aad2de5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Mon, 29 Dec 2025 19:02:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=BB=E7=9F=B3=E5=85=91=E6=8D=A2=E9=87=91?= =?UTF-8?q?=E5=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/UserWallet.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/api/controller/UserWallet.php b/application/api/controller/UserWallet.php index 2f4e1976..1c0edae6 100644 --- a/application/api/controller/UserWallet.php +++ b/application/api/controller/UserWallet.php @@ -57,6 +57,8 @@ class UserWallet extends BaseCom //收益(钻石)兑换金币 public function exchange_coin() { + $key_name = 'exchange_coin_' . $this->uid; + redis_lock_exit($key_name); $earnings_num = input('earnings_num', 0); //最少兑换钻石 $min_earnings_num = get_system_config_value('min_earnings_num'); @@ -64,6 +66,7 @@ class UserWallet extends BaseCom return V(0, '兑换金额不能小于' . $min_earnings_num); } $reslut = model('UserWallet')->exchange_coin($this->uid,$earnings_num); + redis_unlock($key_name); return V($reslut['code'], $reslut['msg'], $reslut['data']); }