|
|
@@ -523,7 +523,13 @@ class ShopController extends BaseController {
|
|
|
->all();
|
|
|
|
|
|
if (!$orderList) {
|
|
|
- LoggerTool::info(['推送wst系统终止,原因:无订单', $createdAtEnd]);
|
|
|
+ LoggerTool::info(['跨境商品推送淘布斯系统终止,原因:无订单', $createdAtEnd]);
|
|
|
+ // 发送预警通知
|
|
|
+ $alarm = [
|
|
|
+ 'brand' => 'MSG',
|
|
|
+ 'message' => '跨境商品推送淘布斯系统终止,原因:无订单',
|
|
|
+ ];
|
|
|
+ Alarm::reportAlarm($alarm);
|
|
|
return static::notice('推送wst系统终止,原因:无订单');
|
|
|
}
|
|
|
|
|
|
@@ -541,16 +547,14 @@ class ShopController extends BaseController {
|
|
|
} else {
|
|
|
// 记录推送结果
|
|
|
$orderSnFailed[] = $order['SN'];
|
|
|
- LoggerTool::error(sprintf('自动推送wst失败. 订单号[%s], error[%s]', $order['SN'], $response));
|
|
|
+ LoggerTool::error(sprintf('跨境商品推送淘布斯系统失败. 订单号[%s], error[%s]', $order['SN'], $response));
|
|
|
// 发送预警通知
|
|
|
$alarm = [
|
|
|
- 'trace-id' => Tool::generateId(),
|
|
|
- 'stance' => 3,
|
|
|
+ 'stance' => 5,
|
|
|
'brand' => 'MSG',
|
|
|
- 'message' => sprintf('自动推送wst失败. 订单号[%s], error[%s]', $order['SN'], $response),
|
|
|
+ 'message' => sprintf('跨境商品推送淘布斯系统失败. 订单号[%s], error[%s]', $order['SN'], $response),
|
|
|
];
|
|
|
Alarm::reportAlarm($alarm);
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -560,6 +564,14 @@ class ShopController extends BaseController {
|
|
|
Order::updateAll(['SEND_AT' => time()], "SN IN ('" . $orderSnSuccessIds . "')");
|
|
|
}
|
|
|
|
|
|
- return static::notice(sprintf('wstLogisticsAutoSend success order count{%d}, orderSN[%s]; failed count{%d}, orderSN[%s]', count($orderSnSuccess), implode(', ', $orderSnSuccess), count($orderSnFailed), implode(', ', $orderSnFailed)));
|
|
|
+ // 发送预警通知
|
|
|
+ $alarm = [
|
|
|
+ 'stance' => 2,
|
|
|
+ 'brand' => 'MSG',
|
|
|
+ 'message' => sprintf('跨境商品推送淘布斯系统结束. 成功订单数{%d}, 订单号[%s]; 失败订单数{%d}, 订单号[%s]', count($orderSnSuccess), implode(', ', $orderSnSuccess), count($orderSnFailed), implode(', ', $orderSnFailed)),
|
|
|
+ ];
|
|
|
+ Alarm::reportAlarm($alarm);
|
|
|
+
|
|
|
+ return static::notice(sprintf('跨境商品推送淘布斯系统结束. 成功订单数{%d}, 订单号[%s]; 失败订单数{%d}, 订单号[%s]', count($orderSnSuccess), implode(', ', $orderSnSuccess), count($orderSnFailed), implode(', ', $orderSnFailed)));
|
|
|
}
|
|
|
}
|