优化游戏通知

This commit is contained in:
pllx
2026-04-30 15:41:50 +08:00
parent 4af4468fc4
commit 9764961519
8 changed files with 225 additions and 65 deletions
+2 -2
View File
@@ -31,6 +31,7 @@ class LotteryService
private readonly UserCurrencyService $currency,
private readonly ChatStateService $chatState,
private readonly GameRoomScopeService $roomScopeService,
private readonly GameBetBroadcastService $betBroadcastService,
) {}
// ─── 购票 ─────────────────────────────────────────────────────────
@@ -139,8 +140,7 @@ class LotteryService
// 用户成功购买后,发送系统传音广播(大家都能看到他买了彩票)
$firstTicket = $tickets[0];
$numsStr = $firstTicket->numbersLabel();
$moreStr = $buyCount > 1 ? "{$buyCount} 注号码" : '';
$this->pushSystemMessage("🎟️ 【{$user->username}】购买 {$issue->issue_no}{$numsStr} {$moreStr}", (int) $issue->room_id);
$this->betBroadcastService->lottery((int) $issue->room_id, $user->username, $issue->issue_no, $numsStr, $buyCount);
return $tickets;
}