From dda459080c3c455b851bc94120a1ccd79847a126 Mon Sep 17 00:00:00 2001 From: lq Date: Tue, 24 Sep 2024 10:53:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E9=98=9F=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/jobs/ProductOrderAutoReceivedJob.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/jobs/ProductOrderAutoReceivedJob.php b/common/jobs/ProductOrderAutoReceivedJob.php index 5565b76..88ca432 100644 --- a/common/jobs/ProductOrderAutoReceivedJob.php +++ b/common/jobs/ProductOrderAutoReceivedJob.php @@ -21,6 +21,7 @@ class ProductOrderAutoReceivedJob extends BaseJob implements JobInterface public function execute($queue) { try { + echo $this->orderId. "产品订单自动收货队列开始执行\n"; ProductOrderLog::saveLog($this->orderId,'产品订单自动收货队列start'); $this->setRequest(); //判断是否已发货状态且到达自动收货时间 @@ -30,7 +31,9 @@ class ProductOrderAutoReceivedJob extends BaseJob implements JobInterface 'is_send' => 1, // 已发货 'status' => 2 //待收货 ]); + if (!$ProductOrder) { + ProductOrderLog::saveLog($this->orderId,'订单不存在或已确认'); throw new \Exception('订单不存在'); } @@ -40,6 +43,8 @@ class ProductOrderAutoReceivedJob extends BaseJob implements JobInterface ProductOrderLog::saveLog($this->orderId,'产品订单自动收货队列end'); + + echo $this->orderId. "产品订单自动收货队列执行成功\n"; } catch (\Exception $exception) { ProductOrderLog::saveLog($this->orderId,'产品订单自动收货队列异常:'.$exception->getMessage().'------'.$exception->getLine()); return;