新需求-活动需求-盲盒转盘调通盘-巡乐会-调试
This commit is contained in:
@@ -163,7 +163,7 @@ class BlindBoxTurntableGiftDrawWorld extends Model
|
||||
->field('bag.id,bag.name,bag.ext,gift.gid as gift_id,gift.gift_price')
|
||||
->where('bag.id', $gift_bag_id)
|
||||
->find();
|
||||
if (!$bag_data || !$bag_data['gift_price']) {
|
||||
if (!$bag_data || !is_array($bag_data) || !isset($bag_data['gift_price'])) {
|
||||
return ['code' => 0, 'msg' => '盲盒配置不存在或盲盒礼物不存在', 'data' => null];
|
||||
}
|
||||
// 2. 获取房间信息
|
||||
@@ -225,7 +225,10 @@ class BlindBoxTurntableGiftDrawWorld extends Model
|
||||
}
|
||||
$totalDrawTimes = 0;//总抽奖次数重置
|
||||
}
|
||||
|
||||
// 在处理奖池重置逻辑之前添加检查
|
||||
if (!is_array($availableGifts)) {
|
||||
throw new \Exception('可用礼物数据格式错误');
|
||||
}
|
||||
// 3. 预加载礼物信息(减少后续查询)
|
||||
$giftInfoMap = $this->preloadGiftInfo($availableGifts);
|
||||
|
||||
@@ -287,6 +290,9 @@ class BlindBoxTurntableGiftDrawWorld extends Model
|
||||
&$currentXlhPeriodsNum,
|
||||
$remaining_available_gifts
|
||||
) {
|
||||
if (!is_array($toarray) || !is_array($availableGifts) || !is_array($giftInfoMap)) {
|
||||
throw new \Exception('预计算参数格式错误');
|
||||
}
|
||||
$precomputedResults = [];
|
||||
$precomputedResultss = [];
|
||||
$addcurrentXlhPeriodsNum = 0;
|
||||
|
||||
Reference in New Issue
Block a user