优化一键测试权重

This commit is contained in:
2026-03-27 14:14:59 +08:00
parent 0bdab95ab7
commit e2273ef41c
13 changed files with 403 additions and 285 deletions

View File

@@ -81,9 +81,10 @@ class DiceRewardController extends BaseController
}
/**
* 一键测试权重:创建测试记录并启动单进程后台执行,按付费/免费、顺逆方向交替写入 dice_play_record_test
* 参数lottery_config_id 可选,不选则传 paid_tier_weights / free_tier_weights 自定义档位;
* paid_s_count, paid_n_count, free_s_count, free_n_count或兼容旧版 s_count, n_count
* 一键测试权重:创建测试记录并启动单进程后台执行,写入 dice_play_record_test
* 参数lottery_config_id 可选paid_tier_weights / free_tier_weights 自定义档位;
* paid_s_count, paid_n_count
* chain_free_mode=1仅按付费次数模拟付费抽到再来一次/T5 则在队列中插入免费局同底注、lottery_type=免费、paid_amount=0
*/
#[Permission('一键测试权重', 'dice:reward:index:startWeightTest')]
public function startWeightTest(Request $request): Response
@@ -94,14 +95,11 @@ class DiceRewardController extends BaseController
'lottery_config_id' => $post['lottery_config_id'] ?? null,
'paid_lottery_config_id' => $post['paid_lottery_config_id'] ?? null,
'free_lottery_config_id' => $post['free_lottery_config_id'] ?? null,
's_count' => $post['s_count'] ?? null,
'n_count' => $post['n_count'] ?? null,
'paid_s_count' => $post['paid_s_count'] ?? null,
'paid_n_count' => $post['paid_n_count'] ?? null,
'free_s_count' => $post['free_s_count'] ?? null,
'free_n_count' => $post['free_n_count'] ?? null,
'paid_tier_weights' => $post['paid_tier_weights'] ?? null,
'free_tier_weights' => $post['free_tier_weights'] ?? null,
'chain_free_mode' => $post['chain_free_mode'] ?? null,
];
$adminId = isset($this->adminInfo['id']) ? (int) $this->adminInfo['id'] : null;
try {