From 78a3cdf7027c7e2932f2fd873bd61e2d4405a207 Mon Sep 17 00:00:00 2001 From: liapples Date: Sat, 9 Oct 2021 10:06:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0$order=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AdminSupplier/Extensions/Grid/IndustryOrderStatus.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/AdminSupplier/Extensions/Grid/IndustryOrderStatus.php b/app/AdminSupplier/Extensions/Grid/IndustryOrderStatus.php index 74b3f5e..bc9f48b 100644 --- a/app/AdminSupplier/Extensions/Grid/IndustryOrderStatus.php +++ b/app/AdminSupplier/Extensions/Grid/IndustryOrderStatus.php @@ -35,6 +35,10 @@ class IndustryOrderStatus extends RowAction DB::beginTransaction(); try { $order = IndustryOrder::where(['id' => $id, 'status' => OrderStatus::OFFLINE_UNPAID])->find($id); + if (!$order) { + throw new \Exception('订单不存在或者已审核过了'); + } + //操作订单表 $order->status = OrderStatus::OFFLINE_PAID; $order->paid_at = now();