|
|
@@ -14,10 +14,10 @@ class HdNotifyClass extends BaseClass
|
|
|
try {
|
|
|
$producer = Yii::$app->rabbitmq->getProducer('notifyProducer');
|
|
|
$msg = serialize(['type' => 'hd_new_order_notify', 'orderId' => $orderId]);
|
|
|
- $producer->publish($msg, 'notifyExchange', 'notifyRoute',['delivery_mode' => 2, 'content_type' => 'application/octet-stream']);
|
|
|
+ $producer->publish($msg, 'notifyExchange', 'notifyRoute', ['delivery_mode' => 2, 'content_type' => 'application/octet-stream']);
|
|
|
} catch (\Exception $e) {
|
|
|
$msg = $e->getMessage();
|
|
|
- $remind = "花店新订单通知,生产消息报错 {$orderId} {$msg}";
|
|
|
+ $remind = "零售,新订单通知,生产消息端报错 {$orderId} {$msg}";
|
|
|
noticeUtil::push($remind, '15280215347');
|
|
|
}
|
|
|
}
|
|
|
@@ -27,10 +27,23 @@ class HdNotifyClass extends BaseClass
|
|
|
try {
|
|
|
$producer = Yii::$app->rabbitmq->getProducer('notifyProducer');
|
|
|
$msg = serialize(['type' => 'hd_new_cg_notify', 'cgId' => $cgId]);
|
|
|
- $producer->publish($msg, 'notifyExchange', 'notifyRoute',['delivery_mode' => 2, 'content_type' => 'application/octet-stream']);
|
|
|
+ $producer->publish($msg, 'notifyExchange', 'notifyRoute', ['delivery_mode' => 2, 'content_type' => 'application/octet-stream']);
|
|
|
} catch (\Exception $e) {
|
|
|
$msg = $e->getMessage();
|
|
|
- $remind = "花店新采购单通知,生产消息报错 {$cgId} {$msg}";
|
|
|
+ $remind = "零售,新采购单通知,生产消息端报错 {$cgId} {$msg}";
|
|
|
+ noticeUtil::push($remind, '15280215347');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static function ptErrorNotify($orderId, $event)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $producer = Yii::$app->rabbitmq->getProducer('notifyProducer');
|
|
|
+ $msg = serialize(['type' => 'hd_pt_error', 'orderId' => $orderId, 'event' => $event]);
|
|
|
+ $producer->publish($msg, 'notifyExchange', 'notifyRoute', ['delivery_mode' => 2, 'content_type' => 'application/octet-stream']);
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ $msg = $e->getMessage();
|
|
|
+ $remind = "零售,跑腿异常通知,生产消息端报错 {$orderId} {$msg}";
|
|
|
noticeUtil::push($remind, '15280215347');
|
|
|
}
|
|
|
}
|