1.修复自动创建下一期bug

This commit is contained in:
2026-05-26 18:08:57 +08:00
parent 6c4e935b6c
commit bdd66f7bd9
4 changed files with 240 additions and 84 deletions

View File

@@ -54,6 +54,20 @@ final class GameBetSettleService
];
}
$periodStatus = filter_var(
Db::name('game_record')->where('id', $recordId)->value('status'),
FILTER_VALIDATE_INT
);
if ($periodStatus === 5) {
return [
'jackpot_hits' => [],
'bet_wins' => [],
'user_streak_events' => [],
'wallet_events' => [],
'settled_order_count' => 0,
];
}
$now = time();
$jackpotMaxAmount = self::jackpotMaxAmount();
$bets = Db::name('bet_order')
@@ -84,6 +98,14 @@ final class GameBetSettleService
$settledOrderCount = 0;
foreach ($bets as $bet) {
$periodStatusNow = filter_var(
Db::name('game_record')->where('id', $recordId)->value('status'),
FILTER_VALIDATE_INT
);
if ($periodStatusNow === 5) {
break;
}
$betId = (int) ($bet['id'] ?? 0);
if ($betId <= 0) {
continue;