调试队列

This commit is contained in:
2024-09-24 10:53:10 +08:00
parent 0de85aebdf
commit dda459080c

View File

@@ -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;