From cd19c499e2c33d9f96899e2c59c8d8f214291983 Mon Sep 17 00:00:00 2001 From: zhenhui <1276357500@qq.com> Date: Thu, 28 May 2026 15:37:51 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96ws=E4=B8=AD=E7=9A=84jackpot?= =?UTF-8?q?.hit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/GameBetSettleService.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/common/service/GameBetSettleService.php b/app/common/service/GameBetSettleService.php index d841a48..abf28f1 100644 --- a/app/common/service/GameBetSettleService.php +++ b/app/common/service/GameBetSettleService.php @@ -148,11 +148,17 @@ final class GameBetSettleService self::creditUserBetFlow($bet, $now); + $jackpotFlags = ['is_jackpot' => false, 'payout_pending_review' => false]; + if (bccomp($win, '0', 2) > 0) { + $jackpotFlags = self::betWinJackpotFlagsForOrder($bet, $win, $needReview); + } + if ($userId > 0) { if (bccomp($win, '0', 2) > 0) { $userOutcome[$userId]['had_win'] = true; } - if (bccomp($win, '0', 2) > 0 && StreakWinReward::isJackpotForStreakAtBet((int) ($bet['streak_at_bet'] ?? 0))) { + // 规则统一:只要 bet.win 判定为中大奖(is_jackpot=true),就必须广播 jackpot.hit 给所有订阅者 + if (bccomp($win, '0', 2) > 0 && ($jackpotFlags['is_jackpot'] ?? false) === true) { $jackpotNotify[$userId] = true; } } @@ -174,7 +180,6 @@ final class GameBetSettleService } if (bccomp($win, '0', 2) > 0) { - $jackpotFlags = self::betWinJackpotFlagsForOrder($bet, $win, $needReview); if (!isset($winByUser[$userId])) { $winByUser[$userId] = [ 'user_id' => $userId,