baseUrl = config('services.mono.url'); $this->http = Http::timeout(config('services.mono.timeout', 30)) ->withoutVerifying(); } /** * 测试连接 */ public function testConnection(): Response { return $this->http->get($this->baseUrl . '/health'); } /** * 更新消息分发状态 */ public function updateDispatch(array $data): Response { return $this->http->post($this->baseUrl . '/rpc/datadispatch/message/update-dispatch', $data); } /** * 手动消费指定消息(由mono从CRM获取消息并进行分发) */ public function consumeMessage(string $msgId): Response { return $this->http->post($this->baseUrl . '/rpc/datadispatch/message/consume', [ 'msg_id' => $msgId, ]); } }