bug修改 盲盒转盘礼物重复推送

This commit is contained in:
2025-09-17 09:58:35 +08:00
parent 8e0b51eae6
commit 0b9f5e88e6
2 changed files with 5 additions and 5 deletions

View File

@@ -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 = [

View File

@@ -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 = 1label_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;
}
}