fix: 统一注单待开奖状态并收敛报表任务返回字段

This commit is contained in:
2026-05-22 11:32:42 +08:00
parent 83f2dd43db
commit 2e8ab58970
10 changed files with 12 additions and 19 deletions

View File

@@ -440,14 +440,14 @@ test('ticket place can return mixed success and failed risk results', function (
->assertJsonPath('code', ErrorCode::Success->value)
->assertJsonPath('data.summary.success_count', 1)
->assertJsonPath('data.summary.failure_count', 1)
->assertJsonPath('data.items.0.status', 'success')
->assertJsonPath('data.items.0.status', 'pending_draw')
->assertJsonPath('data.items.1.status', 'failed')
->assertJsonPath('data.items.1.fail_reason_code', (string) ErrorCode::RiskPoolSoldOut->value);
$order = TicketOrder::query()->firstOrFail();
expect($order->status)->toBe('partial_failed')
->and((int) $order->total_actual_deduct)->toBe(120)
->and(TicketItem::query()->where('status', 'success')->count())->toBe(1)
->and(TicketItem::query()->where('status', 'pending_draw')->count())->toBe(1)
->and(TicketItem::query()->where('status', 'failed')->count())->toBe(1);
$wallet = PlayerWallet::query()->where('player_id', $player->id)->firstOrFail();
@@ -825,7 +825,7 @@ test('ticket pending confirmation reconcile confirms order when wallet deduction
->assertExitCode(0);
expect($order->fresh()->status)->toBe('placed')
->and($item->fresh()->status)->toBe('success')
->and($item->fresh()->status)->toBe('pending_draw')
->and((int) RiskPool::query()->where('draw_id', $draw->id)->where('normalized_number', '1234')->value('locked_amount'))->toBe(3000);
});

View File

@@ -450,7 +450,7 @@ test('my-match only highlights settled winning tickets', function (): void {
'combination_count' => 1,
'estimated_max_payout' => 20_000,
'risk_locked_amount' => 20_000,
'status' => 'success',
'status' => 'pending_draw',
'win_amount' => 0,
'jackpot_win_amount' => 0,
]);