发放礼物加锁

This commit is contained in:
2025-09-09 14:37:25 +08:00
parent 0aecadd263
commit 5e95aa61b1
2 changed files with 4 additions and 1 deletions

View File

@@ -45,8 +45,11 @@ class BlindBoxTurntable extends BaseCom
* 礼物发放
*/
public function gift_send(){
$key_name = "api:blind_box_turntable:gift_send:" . $this->uid;
redis_lock_exit($key_name);
$send_id = input('send_id',0);
$reslut = model('BlindBoxTurntableGift')->gift_send($send_id);
redis_unlock($key_name);
return v($reslut['code'], $reslut['msg'], $reslut['data']);
}

View File

@@ -137,7 +137,7 @@ class RoomAuction extends Model
'auction_id' => $auction_id,
'user_id' => $user_id,
'gift_id' => $gift_id,
'gift_price' => $num * $gift_price,
'gift_price' => $ree['data']['gift_total'],
'createtime' => time()
]);
if(!$res){