1.优化ws中的jackpot.hit
This commit is contained in:
@@ -148,11 +148,17 @@ final class GameBetSettleService
|
|||||||
|
|
||||||
self::creditUserBetFlow($bet, $now);
|
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 ($userId > 0) {
|
||||||
if (bccomp($win, '0', 2) > 0) {
|
if (bccomp($win, '0', 2) > 0) {
|
||||||
$userOutcome[$userId]['had_win'] = true;
|
$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;
|
$jackpotNotify[$userId] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -174,7 +180,6 @@ final class GameBetSettleService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bccomp($win, '0', 2) > 0) {
|
if (bccomp($win, '0', 2) > 0) {
|
||||||
$jackpotFlags = self::betWinJackpotFlagsForOrder($bet, $win, $needReview);
|
|
||||||
if (!isset($winByUser[$userId])) {
|
if (!isset($winByUser[$userId])) {
|
||||||
$winByUser[$userId] = [
|
$winByUser[$userId] = [
|
||||||
'user_id' => $userId,
|
'user_id' => $userId,
|
||||||
|
|||||||
Reference in New Issue
Block a user