bug修改 盲盒转盘礼物重复推送
This commit is contained in:
@@ -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 = [
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user