巡乐会抽奖接口提交.-bug修改
This commit is contained in:
@@ -512,6 +512,9 @@ class BlindBoxTurntableGift extends Model
|
|||||||
for($i = 0; $i < $num; $i++){
|
for($i = 0; $i < $num; $i++){
|
||||||
//本期当前第多少次后抽奖 总的抽奖次数- 剩余数量
|
//本期当前第多少次后抽奖 总的抽奖次数- 剩余数量
|
||||||
$room_pan = db::name("vs_room_pan")->where(['room_id'=>$room_id,'gift_bag_id'=>$gift_bag_id])->field('remaining_number,periods')->find();
|
$room_pan = db::name("vs_room_pan")->where(['room_id'=>$room_id,'gift_bag_id'=>$gift_bag_id])->field('remaining_number,periods')->find();
|
||||||
|
if(empty($room_pan)){
|
||||||
|
return ['code' => 0, 'msg' => '当前房间未配置抽奖礼物,请联系管理员', 'data' => []];
|
||||||
|
}
|
||||||
$total_remaining = $room_pan['remaining_number'];
|
$total_remaining = $room_pan['remaining_number'];
|
||||||
$total_draw_times = $total_quantity - $total_remaining;
|
$total_draw_times = $total_quantity - $total_remaining;
|
||||||
//随机获取一个礼物
|
//随机获取一个礼物
|
||||||
|
|||||||
Reference in New Issue
Block a user