From 19daecf5b9dfa7b370fda812b71bd6c15d6ba1de Mon Sep 17 00:00:00 2001 From: weigang Date: Tue, 15 Sep 2020 10:28:27 +0800 Subject: [PATCH] no message --- app/Controller/v3/NotifyController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Controller/v3/NotifyController.php b/app/Controller/v3/NotifyController.php index d30dec5..6b74410 100644 --- a/app/Controller/v3/NotifyController.php +++ b/app/Controller/v3/NotifyController.php @@ -159,6 +159,8 @@ class NotifyController extends BaseController $this->orderOnlineService->doByPaid($orderMain->global_order_id); $this->separateAccountsService->orderOnlinePaid($orderMain->global_order_id); + Db::commit(); + // 优惠券返券 $this->couponRebateService->couponRebateInTask($orderMain->global_order_id); @@ -172,8 +174,6 @@ class NotifyController extends BaseController // 打印订单,自动打印 $res = $this->feiePrintService->feiePrint($orderMain->global_order_id); - Db::commit(); - // 记录badge $orderChildIds = Order::query()->where(['order_main_id' => $orderMain->global_order_id])->pluck('store_id'); $this->badgeService->doByOrder($orderMain->user_id, $orderChildIds, $orderMain->global_order_id, OrderState::PAID); @@ -256,14 +256,14 @@ class NotifyController extends BaseController $orderPaid = $this->orderOfflineService->doByPaid($orderMain->global_order_id); $separate = $this->separateAccountsService->orderOfflinePaid($orderMain->global_order_id); + Db::commit(); + // 喇叭通知,兼容旧音响,MQTT+IOT $res = $this->mqttService->speakToStore($orderMain->global_order_id); $res = $this->deviceService->pubMsgToStoreByOrderMainId($orderMain->global_order_id); // 公众号模板消息 $res = $this->miniprogramService->sendTemMsgForOfflineOrder($orderMain->global_order_id); - - Db::commit(); return true; } catch (Exception $e) {