getBody(); $order = Order::query() ->select(['id', 'store_id', 'money']) ->where(['order_main_id' => $orderMainId, 'type' => 4, 'dm_state' => 2]) ->first(); if (is_null($order)||!$order) { return Result::ACK; } $deviceNames = SpeakerDevic::query() ->select(['device_name']) ->where(['store_id' => $order['store_id'], 'is_bind' => SpeakerDevic::IS_BIND_YES]) ->get() ->toArray(); if (empty($deviceNames)||!$deviceNames) { return Result::ACK; } $msg = "{\"msg\":\"到账".$order['money']."元\"}"; $res = $this->deviceService->pubMsgToStoreByDevName($deviceNames, $msg); if ($res == true) { return Result::ACK; } else { return Result::REQUEUE; } } catch (\Exception $e) { return Result::REQUEUE; } } public function isEnable(): bool { if(env('APP_ENV') == 'local') { return false; } return parent::isEnable(); } }