From 4f07a7424d87c8a9cc408a5c7289b2260b771c0a Mon Sep 17 00:00:00 2001 From: weigang Date: Mon, 17 Aug 2020 21:37:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/NotifyController.php | 33 ++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/app/Controller/NotifyController.php b/app/Controller/NotifyController.php index 9f47c82..b58bc91 100644 --- a/app/Controller/NotifyController.php +++ b/app/Controller/NotifyController.php @@ -177,14 +177,27 @@ class NotifyController extends BaseController // 喇叭通知,兼容旧音响,MQTT+IOT $res = $this->mqttSpeakerService->speakToStore($orderMain->id); + $this->log->event( + LogLabel::PAY_NOTIFY_WXMINI, + ['fail_mqtt' => json_encode($res)] + ); $res = $this->deviceService->pubMsgToStoreByOrderMainId($orderMain->id); - + $this->log->event( + LogLabel::PAY_NOTIFY_WXMINI, + ['fail_device' => json_encode($res)] + ); // 公众号模板消息 $res = $this->miniprogramService->sendTemMsgForOnlineOrder($orderMain->id); - + $this->log->event( + LogLabel::PAY_NOTIFY_WXMINI, + ['fail_mini' => json_encode($res)] + ); // 打印订单,自动打印 TODO 后续优化调用逻辑 $res = $this->feiePrintService->feiePrint($orderMain->global_order_id); - + $this->log->event( + LogLabel::PAY_NOTIFY_WXMINI, + ['fail_feie' => json_encode($res)] + ); Db::commit(); return true; @@ -352,11 +365,21 @@ class NotifyController extends BaseController // 喇叭通知,兼容旧音响,MQTT+IOT $res = $this->mqttSpeakerService->speakToStore($orderMain->id); + $this->log->event( + LogLabel::PAY_NOTIFY_WXMINI, + ['fail_mqtt' => json_encode($res)] + ); $res = $this->deviceService->pubMsgToStoreByOrderMainId($orderMain->id); - + $this->log->event( + LogLabel::PAY_NOTIFY_WXMINI, + ['fail_device' => json_encode($res)] + ); // 公众号模板消息 $res = $this->miniprogramService->sendTemMsgForOfflineOrder($orderMain->id); - + $this->log->event( + LogLabel::PAY_NOTIFY_WXMINI, + ['fail_mini' => json_encode($res)] + ); Db::commit(); return true;