巡乐会抽奖接口提交.-联调-抽奖逻辑调整
This commit is contained in:
@@ -518,11 +518,9 @@ class BlindBoxTurntableGift extends Model
|
||||
->join('vs_room_pan b','b.gift_bag_detail_id = a.id','left')
|
||||
->where($where)
|
||||
->select();
|
||||
print_r($gift_bag_details);die;
|
||||
if (empty($gift_bag_details)) {
|
||||
return ['code' => 0, 'msg' => '当前盲盒无可用礼物', 'data' => []];
|
||||
}
|
||||
|
||||
// 实现加权随机算法:剩余数量越多,被抽中的概率越大
|
||||
$remaining = 0;
|
||||
foreach ($gift_bag_details as $gift) {
|
||||
|
||||
Reference in New Issue
Block a user