1.优化ws游戏对局推送消息-小奖为bet.win
This commit is contained in:
@@ -101,9 +101,10 @@ final class GameLiveService
|
||||
|
||||
$now = time();
|
||||
$payoutUntil = isset($row['payout_until']) ? (int) $row['payout_until'] : 0;
|
||||
$settleOut = ['jackpot_hits' => [], 'bet_wins' => []];
|
||||
Db::startTrans();
|
||||
try {
|
||||
GameBetSettleService::settleBetsForDraw($recordId, $resultNumber);
|
||||
$settleOut = GameBetSettleService::settleBetsForDraw($recordId, $resultNumber);
|
||||
if ($status === 2) {
|
||||
if ($payoutUntil <= 0) {
|
||||
$payoutUntil = $now + self::getPayoutGraceSeconds();
|
||||
@@ -139,6 +140,9 @@ final class GameLiveService
|
||||
return;
|
||||
}
|
||||
|
||||
$betWins = is_array($settleOut['bet_wins'] ?? null) ? $settleOut['bet_wins'] : [];
|
||||
GameBetSettleService::publishBetWinsAfterCommit($betWins);
|
||||
|
||||
GameHotDataCoordinator::afterGameRecordCommitted($recordId);
|
||||
self::publishSnapshot(null);
|
||||
|
||||
@@ -585,7 +589,7 @@ final class GameLiveService
|
||||
$now = time();
|
||||
$payoutUntil = $now + self::getPayoutGraceSeconds();
|
||||
|
||||
$settleOut = ['jackpot_hits' => []];
|
||||
$settleOut = ['jackpot_hits' => [], 'bet_wins' => []];
|
||||
Db::startTrans();
|
||||
try {
|
||||
Db::name('game_record')->where('id', (int) $record['id'])->update([
|
||||
@@ -603,6 +607,9 @@ final class GameLiveService
|
||||
return ['ok' => false, 'msg' => __('Game live: settlement error') . ': ' . $e->getMessage()];
|
||||
}
|
||||
|
||||
$betWins = is_array($settleOut['bet_wins'] ?? null) ? $settleOut['bet_wins'] : [];
|
||||
GameBetSettleService::publishBetWinsAfterCommit($betWins);
|
||||
|
||||
GameHotDataCoordinator::afterGameRecordCommitted($rid);
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user