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 {