1.优化websocket中的jackpot.hit

This commit is contained in:
2026-05-28 16:52:12 +08:00
parent 4de4d4a721
commit 6b20b074a9
4 changed files with 29 additions and 4 deletions

View File

@@ -95,6 +95,14 @@ GameLiveService::ensurePeriodDrawNotifications(
$payloads = GameBetSettleService::buildBetWinPayloadsFromSettledOrders($periodId, $resultNumber);
if ($payloads !== []) {
// 同时触发 jackpot.hit若 bet.win 判定为大奖则应广播publishSettlementWinsAfterCommit 内含 jackpot.hit 独立去重与从 bet_wins 重建兜底
GameBetSettleService::publishSettlementWinsAfterCommit([
'jackpot_hits' => [],
'bet_wins' => $payloads,
'user_streak_events' => [],
'wallet_events' => [],
'settled_order_count' => 0,
], $periodId, $periodNo, $resultNumber);
GameBetSettleService::publishBetWinsAfterCommit($payloads, $periodId);
echo 'bet.win republished for user_ids: ' . implode(',', array_map(static fn (array $p): int => (int) ($p['user_id'] ?? 0), $payloads)) . PHP_EOL;
} else {