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

@@ -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()