feat: 支持开奖重开与风险池原子扣减,完善投注部分成功流程

This commit is contained in:
2026-05-18 11:28:11 +08:00
parent 4f143c7cb1
commit 9157dcb6a1
14 changed files with 526 additions and 103 deletions

View File

@@ -25,7 +25,7 @@ final class TicketPreviewService
if ($draw === null) {
throw new TicketOperationException('draw_not_found', ErrorCode::BetInvalidDraw->value);
}
if ($draw->status !== DrawStatus::Open->value) {
if ($draw->status !== DrawStatus::Open->value || ($draw->close_time !== null && now()->greaterThanOrEqualTo($draw->close_time))) {
throw new TicketOperationException('draw_closed', ErrorCode::DrawClosed->value);
}
@@ -47,6 +47,7 @@ final class TicketPreviewService
'client_line_no' => $index + 1,
'play_code' => (string) ($line['play_code'] ?? ''),
];
continue;
}