Commit 41ba195d authored by hangjun83's avatar hangjun83

zkh

parent 4b973563
......@@ -236,7 +236,7 @@ class ZhenkhService
}catch(\Throwable $exception){
$dbConnect->rollBack();
SimpleLogs::writeLog($exception->getMessage(),__CLASS__.":updateZhenkhOrders", 'error');
return false;
throw new \Exception($exception->getMessage(),'502');
}
}
......
......@@ -296,9 +296,6 @@ class ZhenKhService
}
if($orderDetail){
$result = $this->zhenKhOrderService->updateZhenkhOrders($order,$orderDetail);
if(!$result){
$this->sendMail('订单同步邮件', '订单号:'.$order['purchaseOrderId'].'未同步成功');
}
}
}
}
......@@ -311,12 +308,16 @@ class ZhenKhService
}
}catch(\Throwable $exception){
$this->apiService->throwableAfter([
'platform_name' => $this->apiService->getPlatformInfo('platform_name'),
'queue_params' => $sendContent,
'fail_content' => $exception->getMessage(),
'queue_reset' => time() + 86400 * 10
]);
if($exception->getCode() == '502'){
$this->sendMail('订单同步邮件', '订单号:'.$order['purchaseOrderId'].'未同步成功');
}else{
$this->apiService->throwableAfter([
'platform_name' => $this->apiService->getPlatformInfo('platform_name'),
'queue_params' => $sendContent,
'fail_content' => $exception->getMessage(),
'queue_reset' => time() + 86400 * 10
]);
}
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