From cc3b2eb74927b53e09268edf2e3635789a8ea99a Mon Sep 17 00:00:00 2001 From: weigang Date: Thu, 13 Aug 2020 23:05:26 +0800 Subject: [PATCH] Fix --- app/Controller/NotifyController.php | 2 +- app/Service/MqttSpeakerService.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Controller/NotifyController.php b/app/Controller/NotifyController.php index f54b3fc..074cf53 100644 --- a/app/Controller/NotifyController.php +++ b/app/Controller/NotifyController.php @@ -140,7 +140,7 @@ class NotifyController extends BaseController ->update(['score' => Db::raw('score+1')]); // 更新商品库存和销量 - $orders = Order::query()->select(['id', 'money', 'user_id', 'store_id']) + $orders = Order::query()->select(['id', 'money', 'user_id', 'store_id', 'pay_time']) ->where(['order_main_id' => $orderMain->id]) ->get() ->toArray(); diff --git a/app/Service/MqttSpeakerService.php b/app/Service/MqttSpeakerService.php index 9724497..5a8b802 100644 --- a/app/Service/MqttSpeakerService.php +++ b/app/Service/MqttSpeakerService.php @@ -5,6 +5,7 @@ namespace App\Service; use App\Model\Order; use App\Model\Store; use App\TaskWorker\MQTTClientTask; +use Hyperf\Utils\ApplicationContext; class MqttSpeakerService implements MqttServiceInterface {