巡乐会抽奖接口提交.-联调-盘-bug修改
This commit is contained in:
@@ -312,6 +312,7 @@ class BlindBoxTurntableGift extends Model
|
||||
'homeowner_gift_id' => $xlh_ext['locking_condition']['give_homeowner_gift_id'],
|
||||
'periods' => $room['xlh_periods']+1,
|
||||
'num' => 0,
|
||||
'end_time' => time() + $xlh_ext['locking_time']['end_time'] * 60,
|
||||
'createtime' => time()
|
||||
]);
|
||||
if(!$pan_xlh_id){
|
||||
@@ -338,12 +339,15 @@ class BlindBoxTurntableGift extends Model
|
||||
if(!$blind_box_turntable){
|
||||
return ['code' => 0, 'msg' => '数据不存在','data' => null];
|
||||
}
|
||||
$blind_box_turntable_log = db('vs_blind_box_turntable_results_log')->where(['tid'=>$send_id,'is_sued'=>0])->select();
|
||||
$blind_box_turntable_log = db('vs_blind_box_turntable_results_log')->where(['tid'=>$send_id])->select();
|
||||
if(!$blind_box_turntable_log){
|
||||
return ['code' => 0, 'msg' => '开奖数据不存在','data' => null];
|
||||
}
|
||||
//获取盲盒配置
|
||||
foreach ($blind_box_turntable_log as $key => $value) {
|
||||
if($value['is_sued'] == 1){ //礼物已发放就不再重复发放
|
||||
continue;
|
||||
}
|
||||
$give_gift_ext['gift_id'] = $value['gift_id'];
|
||||
$give_gift_ext['count'] = $value['count'];
|
||||
$give_gift_ext['gift_price'] = $value['gift_price'];
|
||||
@@ -434,8 +438,6 @@ class BlindBoxTurntableGift extends Model
|
||||
if(empty($pan_xlh)){
|
||||
return ['code' => 0, 'msg' => '未开始', 'data' => null];
|
||||
}
|
||||
//巡乐会结束时间
|
||||
$xlh_end_time = $pan_xlh['createtime'] + $xlh_ext['locking_time']['end_time'] * 60;
|
||||
$xlh_user_data= null;
|
||||
if($pan_xlh['user_id']){
|
||||
$xlh_user = db::name('user')->where('id',$pan_xlh['user_id'])->find();
|
||||
@@ -444,14 +446,12 @@ class BlindBoxTurntableGift extends Model
|
||||
'nickname' => $xlh_user['nickname'],
|
||||
'avatar' => $xlh_user['avatar'],
|
||||
];
|
||||
//寻乐会结束时间
|
||||
$xlh_end_time = $pan_xlh['end_time'];
|
||||
}
|
||||
$result_data = [
|
||||
'title' => $xlh_box['name'],
|
||||
'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'],
|
||||
'xlh_end_time' =>$xlh_end_time,
|
||||
'xlh_end_time' =>$pan_xlh['end_time'],
|
||||
'give_homeowner_gift' => [
|
||||
'gift_id' => $room_user_gift['gid'],
|
||||
'gift_name' => $room_user_gift['gift_name'],
|
||||
@@ -492,6 +492,12 @@ class BlindBoxTurntableGift extends Model
|
||||
if(empty($pan_xlh)){
|
||||
return ['code' => 0, 'msg' => '未开始', 'data' => null];
|
||||
}
|
||||
if($pan_xlh['end_time']<=time()){
|
||||
return ['code' => 0, 'msg' => '本轮已结束', 'data' => null];
|
||||
}
|
||||
if($pan_xlh['send_time']!=0){
|
||||
return ['code' => 0, 'msg' => '本轮已结束,礼物已发放', 'data' => null];
|
||||
}
|
||||
$is_zhong_jiang = 0;
|
||||
$pan_xlh_num = $pan_xlh['num'];
|
||||
//奖池总的抽奖次数
|
||||
|
||||
Reference in New Issue
Block a user