Commit 41ba195d authored by hangjun83's avatar hangjun83

zkh

parent 4b973563
...@@ -236,7 +236,7 @@ class ZhenkhService ...@@ -236,7 +236,7 @@ class ZhenkhService
}catch(\Throwable $exception){ }catch(\Throwable $exception){
$dbConnect->rollBack(); $dbConnect->rollBack();
SimpleLogs::writeLog($exception->getMessage(),__CLASS__.":updateZhenkhOrders", 'error'); SimpleLogs::writeLog($exception->getMessage(),__CLASS__.":updateZhenkhOrders", 'error');
return false; throw new \Exception($exception->getMessage(),'502');
} }
} }
......
...@@ -296,9 +296,6 @@ class ZhenKhService ...@@ -296,9 +296,6 @@ class ZhenKhService
} }
if($orderDetail){ if($orderDetail){
$result = $this->zhenKhOrderService->updateZhenkhOrders($order,$orderDetail); $result = $this->zhenKhOrderService->updateZhenkhOrders($order,$orderDetail);
if(!$result){
$this->sendMail('订单同步邮件', '订单号:'.$order['purchaseOrderId'].'未同步成功');
}
} }
} }
} }
...@@ -311,12 +308,16 @@ class ZhenKhService ...@@ -311,12 +308,16 @@ class ZhenKhService
} }
}catch(\Throwable $exception){ }catch(\Throwable $exception){
$this->apiService->throwableAfter([ if($exception->getCode() == '502'){
'platform_name' => $this->apiService->getPlatformInfo('platform_name'), $this->sendMail('订单同步邮件', '订单号:'.$order['purchaseOrderId'].'未同步成功');
'queue_params' => $sendContent, }else{
'fail_content' => $exception->getMessage(), $this->apiService->throwableAfter([
'queue_reset' => time() + 86400 * 10 'platform_name' => $this->apiService->getPlatformInfo('platform_name'),
]); 'queue_params' => $sendContent,
'fail_content' => $exception->getMessage(),
'queue_reset' => time() + 86400 * 10
]);
}
throw $exception; throw $exception;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment