From e65e70a64e48ccd0cce249034d784fff99626f60 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Sat, 11 Oct 2025 18:04:19 +0800 Subject: [PATCH] no message --- src/Services/Cron.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Services/Cron.php b/src/Services/Cron.php index b7c62bac0..e9a566f43 100755 --- a/src/Services/Cron.php +++ b/src/Services/Cron.php @@ -835,15 +835,14 @@ final class Cron try { - DB::beginTransaction(); - $invoice = (new Invoice())->where('order_id', $oOrder->id)->first(); if ($invoice === null) { - DB::commit(); continue; } + DB::beginTransaction(); + // 付款完成后 if (in_array($invoice->status, ['paid_gateway', 'paid_balance', 'paid_admin'])) { @@ -900,7 +899,11 @@ final class Cron $invoice->status = 'cancelled'; $invoice->update_time = time(); - echo $invoice->save(); + $invoice->save(); + + $oOrder->status = 'cancelled'; + $oOrder->update_time = time(); + $oOrder->save(); if ($invoice->money_use > 0) { $iUserMoneyOld = $oUser->money;