|
|
|
@ -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; |
|
|
|
|
|
|
|
|