新需求-活动需求-盲盒转盘调通盘-调试
This commit is contained in:
@@ -792,10 +792,11 @@ class BlindBoxTurntableGift extends Model
|
|||||||
//巡乐会主礼物
|
//巡乐会主礼物
|
||||||
$xlh_main_gift = db::name('vs_gift')->where('gid',$xlh_ext['locking_condition']['locking_gift_id'])->find();
|
$xlh_main_gift = db::name('vs_gift')->where('gid',$xlh_ext['locking_condition']['locking_gift_id'])->find();
|
||||||
//中奖用户
|
//中奖用户
|
||||||
$xlh_periods = $room_data['xlh_periods']??0;
|
$xlh_periods = $xlh_box['periods']??0;
|
||||||
$pan_xlh = db::name('vs_room_pan_xlh')->where(['room_id'=>$room_id,'periods'=>$xlh_periods,'send_time'=>0])->find();
|
$pan_xlh = db::name('vs_room_pan_xlh')->where(['periods'=>$xlh_periods,'send_time'=>0])->find();
|
||||||
|
$xlh_periods_num = Cache::get("xlh_periods_num") ?? 0;
|
||||||
if(empty($pan_xlh)){
|
if(empty($pan_xlh)){
|
||||||
if($room_data['xlh_periods_num'] >= $xlh_ext['open_condition']['start_num']){
|
if($xlh_periods_num >= $xlh_ext['open_condition']['start_num']){
|
||||||
$pan_xlh_id = db::name('vs_room_pan_xlh')->insertGetId([
|
$pan_xlh_id = db::name('vs_room_pan_xlh')->insertGetId([
|
||||||
'room_id' => $room_id,
|
'room_id' => $room_id,
|
||||||
'gift_id' => $xlh_ext['locking_condition']['locking_gift_id'],
|
'gift_id' => $xlh_ext['locking_condition']['locking_gift_id'],
|
||||||
@@ -1162,17 +1163,19 @@ class BlindBoxTurntableGift extends Model
|
|||||||
->where(['id'=>$room_id])
|
->where(['id'=>$room_id])
|
||||||
->field('id,room_name,xlh_periods,xlh_periods_num')
|
->field('id,room_name,xlh_periods,xlh_periods_num')
|
||||||
->find();
|
->find();
|
||||||
$room_data['xlh_periods'] = $room_data['xlh_periods'] ?? 0;
|
// $room_data['xlh_periods'] = $room_data['xlh_periods'] ?? 0;
|
||||||
$xlh_data = db('vs_room_pan_xlh')
|
// $xlh_data = db('vs_room_pan_xlh')
|
||||||
->where(["room_id"=>$room_id,"periods"=>$room_data['xlh_periods']])
|
// ->where(["room_id"=>$room_id,"periods"=>$room_data['xlh_periods']])
|
||||||
->field('id,room_id,periods,end_time')
|
// ->field('id,room_id,periods,end_time')
|
||||||
->find();
|
// ->find();
|
||||||
|
$xlh_data = db('vs_room_pan_xlh')->where(["send_time"=>0])->field('id,room_id,periods,end_time')->order('periods desc')->find();
|
||||||
//寻乐会状态
|
//寻乐会状态
|
||||||
$xlh_status = 0;
|
$xlh_status = 0;
|
||||||
// 状态
|
// 状态
|
||||||
if($room_data['xlh_periods_num'] >= $xlh_ext['open_condition']['start_num']){
|
$xlh_periods_num = Cache::get("xlh_periods_num") ?? 0;
|
||||||
|
if($xlh_periods_num >= $xlh_ext['open_condition']['start_num']){
|
||||||
$xlh_status = 1;//状态 1:巡乐会开始 2:即将开始 0:等待开始
|
$xlh_status = 1;//状态 1:巡乐会开始 2:即将开始 0:等待开始
|
||||||
} elseif($room_data['xlh_periods_num'] >= $xlh_ext['open_condition']['waiting_start_num'] && $room_data['xlh_periods_num'] < $xlh_ext['open_condition']['start_num']){
|
} elseif($xlh_periods_num >= $xlh_ext['open_condition']['waiting_start_num'] && $xlh_periods_num < $xlh_ext['open_condition']['start_num']){
|
||||||
$xlh_status = 2;//状态 1:巡乐会开始 2:即将开始开始 0:等待开始
|
$xlh_status = 2;//状态 1:巡乐会开始 2:即将开始开始 0:等待开始
|
||||||
}else{
|
}else{
|
||||||
$xlh_status = 0;//未开始
|
$xlh_status = 0;//未开始
|
||||||
@@ -1193,7 +1196,7 @@ class BlindBoxTurntableGift extends Model
|
|||||||
$gift_bag_id = 13;
|
$gift_bag_id = 13;
|
||||||
$xlh_box = db::name('vs_gift_bag')->where('id',$gift_bag_id)->find();
|
$xlh_box = db::name('vs_gift_bag')->where('id',$gift_bag_id)->find();
|
||||||
$xlh_ext = json_decode($xlh_box['ext'],true);
|
$xlh_ext = json_decode($xlh_box['ext'],true);
|
||||||
$pan_xlh = db::name('vs_room_pan_xlh')->where(['send_time'=>0])
|
$pan_xlh = db::name('vs_room_pan_xlh')->where(['room_id'=>$room_id])
|
||||||
->order('id desc')
|
->order('id desc')
|
||||||
->page($page,$page_size)
|
->page($page,$page_size)
|
||||||
->select();
|
->select();
|
||||||
|
|||||||
Reference in New Issue
Block a user