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;