定版之后bug修改

This commit is contained in:
2025-09-22 09:28:10 +08:00
parent 38cb41d57f
commit e53494c0f5
4 changed files with 25 additions and 7 deletions

View File

@@ -759,6 +759,7 @@ class BlindBoxTurntableGift extends Model
* 巡乐会
*/
public function xlh_gift_list($room_id){
$room_data = db::name('vs_room')->field('xlh_periods,xlh_periods_num')-> where('id',$room_id)->find();
$gift_bag_id = 13;
$xlh_box = db::name('vs_gift_bag')->where('id',$gift_bag_id)->find();
$xlh_ext = json_decode($xlh_box['ext'],true);
@@ -780,10 +781,24 @@ class BlindBoxTurntableGift extends Model
//巡乐会主礼物
$xlh_main_gift = db::name('vs_gift')->where('gid',$xlh_ext['locking_condition']['locking_gift_id'])->find();
//中奖用户
$xlh_periods = db::name('vs_room')->where('id',$room_id)->value('xlh_periods');
$pan_xlh = db::name('vs_room_pan_xlh')->where(['room_id'=>$room_id,'periods'=>$xlh_periods])->find();
$xlh_periods = $room_data['xlh_periods']??0;
$pan_xlh = db::name('vs_room_pan_xlh')->where(['room_id'=>$room_id,'periods'=>$xlh_periods,'send_time'=>0])->find();
if(empty($pan_xlh)){
return ['code' => 0, 'msg' => '未开始', 'data' => null];
if($room_data['xlh_periods_num'] >= $xlh_ext['open_condition']['start_num']){
$pan_xlh_id = db::name('vs_room_pan_xlh')->insertGetId([
'room_id' => $room_id,
'gift_id' => $xlh_ext['locking_condition']['locking_gift_id'],
'homeowner_gift_id' => $xlh_ext['locking_condition']['give_homeowner_gift_id'],
'periods' => $xlh_periods+1,
'num' => 0,
'end_time' => time() + $xlh_ext['locking_time']['end_time'] * 60,
'createtime' => time()
]);
db::name("vs_room")->where('id',$room_id)->setInc('xlh_periods');//修改巡乐会期数
$pan_xlh = db::name('vs_room_pan_xlh')->where(['id'=>$pan_xlh_id])->find();
}else{
return ['code' => 0, 'msg' => '未开始', 'data' => null];
}
}
$xlh_user_data= null;
if($pan_xlh && $pan_xlh['user_id']){