线上bug修改

This commit is contained in:
2025-10-22 14:32:56 +08:00
parent 24bb57f516
commit c49abb572f
2 changed files with 35 additions and 25 deletions

View File

@@ -236,23 +236,26 @@ class BlindBoxTurntableGift extends Model
$pan_xlh = db::name('vs_room_pan_xlh')->where(['send_time'=>0,'end_time'=>['>',time()]])->order('id desc')->find();
$xlh_periods_num = Cache::get("xlh_periods_num") ?? 0;
if(empty($pan_xlh)){
if($xlh_periods_num >= $xlh_ext['open_condition']['start_num']){
$xlh_periods = Cache::get("this_xlh_periods") ?? 0;
$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()
]);
Cache::set("this_xlh_periods", $xlh_periods+1, 0);//修改巡乐会期数
$pan_xlh = db::name('vs_room_pan_xlh')->where(['id'=>$pan_xlh_id])->find();
}else{
return ['code' => 0, 'msg' => '巡乐会已结束', 'data' => null];
}
return ['code' => 0, 'msg' => '巡乐会已结束', 'data' => null];
}
// if(empty($pan_xlh)){
// if($xlh_periods_num >= $xlh_ext['open_condition']['start_num']){
// $xlh_periods = Cache::get("this_xlh_periods") ?? 0;
// $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()
// ]);
// Cache::set("this_xlh_periods", $xlh_periods+1, 0);//修改巡乐会期数
// $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;
$room_user_data = null;
if($pan_xlh && $pan_xlh['user_id']){