From 54760b5a3caeb6328f1e15e2bb6b2115b2c6a787 Mon Sep 17 00:00:00 2001 From: "Mr. Shuixiang" Date: Fri, 16 Oct 2020 22:28:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B=E5=B0=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/v3/NotifyController.php | 6 +++--- app/Service/v3/Implementations/DeviceService.php | 2 +- app/Service/v3/Implementations/PaymentService.php | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Controller/v3/NotifyController.php b/app/Controller/v3/NotifyController.php index ed5d970..f4c8810 100644 --- a/app/Controller/v3/NotifyController.php +++ b/app/Controller/v3/NotifyController.php @@ -170,15 +170,15 @@ class NotifyController extends BaseController $res = $this->mqttService->speakToStore($orderMain->global_order_id); $res = $this->deviceService->pubMsgToStoreByOrderMainId($orderMain->global_order_id); - // 公众号模板消息 - $res = $this->miniprogramService->sendTemMsgForOnlineOrder($orderMain->global_order_id); - // 打印订单,自动打印 $res = $this->feiePrintService->feiePrint($orderMain->global_order_id); // 记录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); + + // 公众号模板消息 + $res = $this->miniprogramService->sendTemMsgForOnlineOrder($orderMain->global_order_id); return true; } catch (Exception $e) { diff --git a/app/Service/v3/Implementations/DeviceService.php b/app/Service/v3/Implementations/DeviceService.php index 698ccb9..0917ba4 100644 --- a/app/Service/v3/Implementations/DeviceService.php +++ b/app/Service/v3/Implementations/DeviceService.php @@ -116,7 +116,7 @@ class DeviceService implements DeviceServiceInterface ->where(['store_id' => $order['store_id'], 'is_bind' => SpeakerDevic::IS_BIND_YES]) ->get() ->toArray(); - $msg = $order['order_main']['type'] == 1 ? "{\"msg\":\"懒族生活提示您:您有新的懒族外卖订单\"}" : "{\"msg\":\"微信到账".$order['money']."元\"}"; + $msg = $order['order_main']['type'] == 1 ? "{\"msg\":\"懒族生活提示您:您有新的懒族外卖订单\"}" : "{\"msg\":\"微信到账".floatval($order['money'])."元\"}"; foreach ($device_names as $key => $dev_name) { $this->IOTService->pub($dev_name['device_name'], $msg); } diff --git a/app/Service/v3/Implementations/PaymentService.php b/app/Service/v3/Implementations/PaymentService.php index 68b33a7..c982f4b 100644 --- a/app/Service/v3/Implementations/PaymentService.php +++ b/app/Service/v3/Implementations/PaymentService.php @@ -36,6 +36,7 @@ class PaymentService implements PaymentServiceInterface protected $log; /** + * @Inject * @var SmsSendServiceInterface */ protected $smsAliSendService;