盲盒转盘 优化-飘屏处理 提交
This commit is contained in:
@@ -111,7 +111,8 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
|
||||
$this->handlePostDrawOperations(
|
||||
$precomputedResults,
|
||||
$boxTurntableLog,
|
||||
$room_id
|
||||
$room_id,
|
||||
$total_num
|
||||
);
|
||||
// 6. 构建并返回结果
|
||||
return $this->buildDrawResult($boxTurntableLog, $giftCounts);
|
||||
@@ -870,7 +871,8 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
|
||||
private function handlePostDrawOperations(
|
||||
$precomputedResults,
|
||||
$boxTurntableLog,
|
||||
$room_id
|
||||
$room_id,
|
||||
$total_num
|
||||
) {
|
||||
// 获取巡乐会配置(使用缓存)
|
||||
$xlh_ext = $this->getCachedGiftBag(13);
|
||||
@@ -878,7 +880,7 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
|
||||
$this->batchInsertBlindBoxResults($precomputedResults, $boxTurntableLog);
|
||||
// 2. 处理巡乐会相关操作
|
||||
if (!empty($xlh_ext) && $xlh_ext['inlet_bag_id'] == $precomputedResults[0]['gift_bag_detail']['gift_bag_id']) {
|
||||
$this->handleXlhOperations($room_id, $xlh_ext);
|
||||
$this->handleXlhOperations($room_id, $xlh_ext,$total_num);
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -909,14 +911,16 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
|
||||
/**
|
||||
* 处理巡乐会相关操作
|
||||
*/
|
||||
private function handleXlhOperations($room_id, $xlh_ext)
|
||||
private function handleXlhOperations($room_id, $xlh_ext,$total_num)
|
||||
{
|
||||
$xlhIsPiaoPing = 0;
|
||||
$xlhPeriodsNum = $this->getCachedXlhPeriodsNum("get");
|
||||
if($xlhPeriodsNum == $xlh_ext['open_condition']['waiting_start_num']){
|
||||
//上一次的数量
|
||||
$xlhLastPeriodsNum = $xlhPeriodsNum-$total_num;
|
||||
if($xlhLastPeriodsNum < $xlhPeriodsNum && $xlhPeriodsNum >= $xlh_ext['open_condition']['waiting_start_num']){
|
||||
$xlhIsPiaoPing = 1;
|
||||
}
|
||||
if($xlhPeriodsNum == $xlh_ext['open_condition']['start_num']){
|
||||
if($xlhLastPeriodsNum < $xlhPeriodsNum && $xlhPeriodsNum >= $xlh_ext['open_condition']['start_num']){
|
||||
$xlhIsPiaoPing = 2;
|
||||
}
|
||||
// 处理飘屏
|
||||
|
||||
Reference in New Issue
Block a user