From 0b9f5e88e66932debf245f14750c9b1e2b5ce9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Wed, 17 Sep 2025 09:58:35 +0800 Subject: [PATCH] =?UTF-8?q?=20bug=E4=BF=AE=E6=94=B9=20=20=E7=9B=B2?= =?UTF-8?q?=E7=9B=92=E8=BD=AC=E7=9B=98=E7=A4=BC=E7=89=A9=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/BlindBoxTurntableGift.php | 2 +- application/api/model/Room.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/application/api/model/BlindBoxTurntableGift.php b/application/api/model/BlindBoxTurntableGift.php index e860663..d22f608 100644 --- a/application/api/model/BlindBoxTurntableGift.php +++ b/application/api/model/BlindBoxTurntableGift.php @@ -869,7 +869,7 @@ class BlindBoxTurntableGift extends Model if(empty($room_pan)){ return ['code' => 0, 'msg' => '当前房间未配置抽奖礼物,请联系管理员', 'data' => []]; } - $total_remaining = $room_pan['remaining_number']; + $total_remaining = db::name("vs_room_pan")->where(['room_id'=>$room_id,'gift_bag_id'=>$gift_bag_id])->sum('remaining_number'); $total_draw_times = $total_quantity - $total_remaining; //随机获取一个礼物 $where = [ diff --git a/application/api/model/Room.php b/application/api/model/Room.php index d793e21..bfd7606 100644 --- a/application/api/model/Room.php +++ b/application/api/model/Room.php @@ -1287,11 +1287,11 @@ class Room extends Model //$from_type 来源 1聊天送礼物 2房间语聊送礼 3直播送礼 4动态打赏 5系统任务 6-cp房间送礼 //$type 1金币购买 2送背包礼物 //送礼人,接收者(群),礼物id,礼物数量,来源,类型,来源id(房间id),麦位 - $res = model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,2,$type, $room_id,$pit_number,$give_gift_ext); + $res = model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,2,$type, $room_id,$pit_number,0,$give_gift_ext); return $res; }elseif (($label_type['data']['type_id'] == 1 || $label_type['data']['type_id'] == 3 || $label_type['data']['type_id'] == 4) && $label_type['data']['label_id'] == 2)//K歌,type_id = 1,label_id = 2 { - $res = model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,2,$type, $room_id,$pit_number,$give_gift_ext); + $res = model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,2,$type, $room_id,$pit_number,0,$give_gift_ext); if($res['code'] == 1){ $room_pits = model('RoomSong')->get_charm_rank($room_id); if($room_pits['code'] == 1){ @@ -1305,11 +1305,11 @@ class Room extends Model } return $res; }elseif($label_type['data']['type_id'] == 6){ - return model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,6,$type, $room_id,$pit_number,$give_gift_ext); + return model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,6,$type, $room_id,$pit_number,0,$give_gift_ext); }elseif($label_type['data']['type_id'] == 7){ return model('Friend')->room_give_gift($uid, $to_uid, $gift_id, $gift_num,2,$type, $room_id,$pit_number,$heart_id,$give_gift_ext); }else{ - $res = model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,2,$type, $room_id,$pit_number,$give_gift_ext); + $res = model('GiveGift')->give_gift($uid, $to_uid, $gift_id, $gift_num,2,$type, $room_id,$pit_number,0,$give_gift_ext); return $res; } }