feat: Enhance settlement and draw management functionality

- Implement error handling for skipped settlement runs in DrawSettlementRunController, returning appropriate error messages based on draw status.
- Add validation in DrawPublishService to ensure draws are ready for publication, rejecting outdated result batches.
- Update SettlementBatchWorkflowService to revert ticket statuses upon settlement rejection and restore jackpot pool amounts.
- Refactor LotteryTransferService to improve transaction handling for transfer order reconciliation, ensuring idempotency during reversals.
- Add multi-language support for new error messages related to settlement processes.
This commit is contained in:
2026-05-26 14:10:16 +08:00
parent e4118d7b1d
commit 48349e3302
10 changed files with 354 additions and 43 deletions

View File

@@ -654,6 +654,8 @@ test('cooldown expiry tick moves draw to settling', function (): void {
]);
LotterySettings::put('draw.require_manual_review', false, 'draw', 'RNG 开奖后是否必须进入人工审核');
LotterySettings::put('draw.cooldown_minutes', 15, 'draw', '开奖结果发布后的冷静期分钟数');
LotterySettings::put('settlement.auto_approve_on_tick', false, 'settlement', '本用例仅验证进入结算态,不自动审核派彩');
LotterySettings::put('settlement.auto_payout_on_tick', false, 'settlement', '本用例仅验证进入结算态,不自动派彩');
Carbon::setTestNow(Carbon::parse('2026-05-09 14:07:00', 'UTC'));
$drawTime = now()->copy()->subMinute();