Browse Source

修复一些小问题

master
Mr. Shuixiang 5 years ago
parent
commit
54760b5a3c
  1. 6
      app/Controller/v3/NotifyController.php
  2. 2
      app/Service/v3/Implementations/DeviceService.php
  3. 1
      app/Service/v3/Implementations/PaymentService.php

6
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) {

2
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);
}

1
app/Service/v3/Implementations/PaymentService.php

@ -36,6 +36,7 @@ class PaymentService implements PaymentServiceInterface
protected $log;
/**
* @Inject
* @var SmsSendServiceInterface
*/
protected $smsAliSendService;

Loading…
Cancel
Save