定版之后bug修改----盲盒转盘并发问题处理
This commit is contained in:
@@ -440,11 +440,12 @@ class BlindBoxTurntableGift extends Model
|
|||||||
];
|
];
|
||||||
$push->xunlehui($text_list_new);
|
$push->xunlehui($text_list_new);
|
||||||
// 巡乐会正式开始
|
// 巡乐会正式开始
|
||||||
|
$this_xlh_periods = db::name('vs_room')->where('id',$room_id)->value('xlh_periods');
|
||||||
$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'],
|
||||||
'homeowner_gift_id' => $xlh_ext['locking_condition']['give_homeowner_gift_id'],
|
'homeowner_gift_id' => $xlh_ext['locking_condition']['give_homeowner_gift_id'],
|
||||||
'periods' => $room['xlh_periods']+1,
|
'periods' => $this_xlh_periods+1,
|
||||||
'num' => 0,
|
'num' => 0,
|
||||||
'end_time' => time() + $xlh_ext['locking_time']['end_time'] * 60,
|
'end_time' => time() + $xlh_ext['locking_time']['end_time'] * 60,
|
||||||
'createtime' => time()
|
'createtime' => time()
|
||||||
@@ -781,7 +782,7 @@ class BlindBoxTurntableGift extends Model
|
|||||||
return ['code' => 0, 'msg' => '未开始', 'data' => null];
|
return ['code' => 0, 'msg' => '未开始', 'data' => null];
|
||||||
}
|
}
|
||||||
$xlh_user_data= null;
|
$xlh_user_data= null;
|
||||||
if($pan_xlh['user_id']){
|
if($pan_xlh && $pan_xlh['user_id']){
|
||||||
$xlh_user = db::name('user')->where('id',$pan_xlh['user_id'])->find();
|
$xlh_user = db::name('user')->where('id',$pan_xlh['user_id'])->find();
|
||||||
$xlh_user_data = [
|
$xlh_user_data = [
|
||||||
'user_id' => $xlh_user['id'],
|
'user_id' => $xlh_user['id'],
|
||||||
@@ -793,7 +794,7 @@ class BlindBoxTurntableGift extends Model
|
|||||||
'title' => $xlh_box['name'],
|
'title' => $xlh_box['name'],
|
||||||
'rule_url' => get_system_config_value('web_site')."/api/Page/get_gift_box_rule?box_id=".$xlh_box["id"],
|
'rule_url' => get_system_config_value('web_site')."/api/Page/get_gift_box_rule?box_id=".$xlh_box["id"],
|
||||||
'box_price' => $xlh_ext['xlh_box_price'],
|
'box_price' => $xlh_ext['xlh_box_price'],
|
||||||
'xlh_end_time' =>$pan_xlh['end_time'],
|
'xlh_end_time' =>$pan_xlh['end_time']??0,
|
||||||
'give_homeowner_gift' => [
|
'give_homeowner_gift' => [
|
||||||
'gift_id' => $room_user_gift['gid'],
|
'gift_id' => $room_user_gift['gid'],
|
||||||
'gift_name' => $room_user_gift['gift_name'],
|
'gift_name' => $room_user_gift['gift_name'],
|
||||||
@@ -804,7 +805,7 @@ class BlindBoxTurntableGift extends Model
|
|||||||
'gift_name' => $xlh_main_gift['gift_name'],
|
'gift_name' => $xlh_main_gift['gift_name'],
|
||||||
'gift_price' => $xlh_main_gift['gift_price'],
|
'gift_price' => $xlh_main_gift['gift_price'],
|
||||||
'base_image' => $xlh_main_gift['base_image'],
|
'base_image' => $xlh_main_gift['base_image'],
|
||||||
'gift_num' => $pan_xlh['num']
|
'gift_num' => $pan_xlh['num']??0
|
||||||
],
|
],
|
||||||
'xlh_user' => $xlh_user_data,
|
'xlh_user' => $xlh_user_data,
|
||||||
'gift_list' => $gift_list,
|
'gift_list' => $gift_list,
|
||||||
|
|||||||
Reference in New Issue
Block a user