|
|
@@ -520,16 +520,15 @@ class ShopController extends BaseController {
|
|
|
)
|
|
|
->asArray()
|
|
|
->all();
|
|
|
-LoggerTool::debug(1);
|
|
|
+
|
|
|
if (!$orderList) {
|
|
|
LoggerTool::info(['推送wst系统终止,原因:无订单', $createdAtStart, $createdAtEnd]);
|
|
|
return static::notice('推送wst系统终止,原因:无订单');
|
|
|
}
|
|
|
- LoggerTool::debug(2);
|
|
|
+
|
|
|
$orderSnSuccess = [];
|
|
|
$orderSnFailed = [];
|
|
|
$logistics = new Logistics();
|
|
|
- LoggerTool::debug(3);
|
|
|
foreach ($orderList as $order) {
|
|
|
// 发送wst仓库系统
|
|
|
$response = $logistics->createOrder($order);
|
|
|
@@ -541,14 +540,12 @@ LoggerTool::debug(1);
|
|
|
} else {
|
|
|
$orderSnFailed[] = $order['SN'];
|
|
|
}
|
|
|
-
|
|
|
- $orderSnSuccess[] = $response;
|
|
|
}
|
|
|
|
|
|
LoggerTool::debug(4);
|
|
|
// 更新db中订单推送成功状态
|
|
|
if (count($orderSnSuccess) > 0) {
|
|
|
- Order::updateAll(['SEND_AT' => time()], 'SN IN (:SN)', [':SN' => implode("', '", $orderSnSuccess)]);
|
|
|
+ Order::updateAll(['SEND_AT' => time()], 'SN IN (:SN)', [':SN' => $orderSnSuccess]);
|
|
|
}
|
|
|
LoggerTool::debug(5);
|
|
|
if (count($orderSnFailed) > 0) {
|