修改DiceLotteryPoolConfig-type改为name映射

This commit is contained in:
2026-03-17 17:09:10 +08:00
parent d4cf708bc1
commit e7b8f4cae9
18 changed files with 64 additions and 115 deletions

View File

@@ -71,10 +71,10 @@ class PlayStartLogic
$lotteryService = LotteryService::getOrCreate($playerId);
$ticketType = LotteryService::drawTicketType($paid, $free);
$configType0 = DiceLotteryPoolConfig::where('type', 0)->find();
$configType1 = DiceLotteryPoolConfig::where('type', 1)->find();
$configType0 = DiceLotteryPoolConfig::where('name', 'default')->find();
$configType1 = DiceLotteryPoolConfig::where('name', 'killScore')->find();
if (!$configType0) {
throw new ApiException('奖池配置不存在(需 type=0');
throw new ApiException('奖池配置不存在(需 name=default');
}
// 玩家累计盈利:仅统计 lottery_config_id=type=0 的成功对局(中奖金额-100*局数)