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

@@ -31,10 +31,7 @@ final class ReportJobIndexController extends Controller
'admin_user_id' => $j->admin_user_id !== null ? (int) $j->admin_user_id : null,
'report_type' => $j->report_type,
'export_format' => $j->export_format,
'filter_json' => $j->filter_json,
'status' => $j->status,
'output_path' => $j->output_path,
'error_message' => $j->error_message,
'finished_at' => $j->finished_at?->toIso8601String(),
'created_at' => $j->created_at?->toIso8601String(),
];

View File

@@ -18,10 +18,7 @@ final class ReportJobShowController extends Controller
'admin_user_id' => $report_job->admin_user_id !== null ? (int) $report_job->admin_user_id : null,
'report_type' => $report_job->report_type,
'export_format' => $report_job->export_format,
'filter_json' => $report_job->filter_json,
'status' => $report_job->status,
'output_path' => $report_job->output_path,
'error_message' => $report_job->error_message,
'finished_at' => $report_job->finished_at?->toIso8601String(),
'created_at' => $report_job->created_at?->toIso8601String(),
]);

View File

@@ -33,7 +33,6 @@ final class ReportJobStoreController extends Controller
'report_type' => $job->report_type,
'export_format' => $job->export_format,
'status' => $job->status,
'output_path' => $job->output_path,
]);
}
}

View File

@@ -61,7 +61,7 @@ final class TicketDrawMyMatchController extends Controller
$itemIds = TicketItem::query()
->where('draw_id', $draw->id)
->where('player_id', $player->id)
->whereIn('status', ['success', 'settled_win', 'settled_lose'])
->whereIn('status', ['pending_draw', 'settled_win', 'settled_lose'])
->pluck('id');
$hasBets = $itemIds->isNotEmpty();

View File

@@ -99,7 +99,7 @@ final class SettlementOrchestrator
$ticketItems = TicketItem::query()
->where('draw_id', $locked->id)
->where('status', 'success')
->where('status', 'pending_draw')
->with(['combinations', 'order'])
->orderBy('id')
->get();

View File

@@ -50,7 +50,7 @@ final class TicketPendingConfirmReconcileService
->where('order_id', $lockedOrder->id)
->where('status', 'pending_confirm')
->update([
'status' => 'success',
'status' => 'pending_draw',
'fail_reason_code' => null,
'fail_reason_text' => null,
'updated_at' => now(),

View File

@@ -282,7 +282,7 @@ final class TicketPlacementService
->get();
foreach ($successfulItems as $item) {
$item->forceFill(['status' => 'success'])->save();
$item->forceFill(['status' => 'pending_draw'])->save();
$this->jackpotContribution->recordFromPlacedTicketItem($item, $draw, (string) $placement['currency_code']);
}
@@ -332,7 +332,7 @@ final class TicketPlacementService
{
$order = TicketOrder::query()->whereKey($order->id)->firstOrFail();
$draw = Draw::query()->whereKey((int) $order->draw_id)->firstOrFail();
$successCount = TicketItem::query()->where('order_id', $order->id)->where('status', 'success')->count();
$successCount = TicketItem::query()->where('order_id', $order->id)->where('status', 'pending_draw')->count();
$failureCount = TicketItem::query()->where('order_id', $order->id)->where('status', 'failed')->count();
if ($balanceAfter === null) {
$walletTxn = WalletTxn::query()