From 6c1a44ca8e7ebc0539c0d57788e3e1fd517b94a2 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Thu, 4 May 2023 10:53:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=97=AE=E8=AF=8A=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Amqp/Consumer/SendSubMessageConsumer.php | 7 +++---- app/Services/InquiryService.php | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/Amqp/Consumer/SendSubMessageConsumer.php b/app/Amqp/Consumer/SendSubMessageConsumer.php index 9fbd558..552b58a 100644 --- a/app/Amqp/Consumer/SendSubMessageConsumer.php +++ b/app/Amqp/Consumer/SendSubMessageConsumer.php @@ -280,7 +280,7 @@ class SendSubMessageConsumer extends ConsumerMessage * 接收所有异常 * 只返回true,失败情况不处理 * @param string|int $user_type - * @return bool + * @return void * @throws ClientExceptionInterface * @throws ContainerExceptionInterface * @throws DecodingExceptionInterface @@ -289,7 +289,7 @@ class SendSubMessageConsumer extends ConsumerMessage * @throws ServerExceptionInterface * @throws TransportExceptionInterface */ - private function downSubTemplate(string|int $user_type): bool + private function downSubTemplate(string|int $user_type): void { try { Log::getInstance()->info("下载微信消息订阅模版"); @@ -297,7 +297,7 @@ class SendSubMessageConsumer extends ConsumerMessage $weChat = new Wechat($user_type); $result = $weChat->getTemplate(); if (empty($result)){ - return true; + return; } $template = json_decode($result, true); @@ -327,6 +327,5 @@ class SendSubMessageConsumer extends ConsumerMessage } Log::getInstance()->info("下载微信消息订阅模版成功"); - return true; } } diff --git a/app/Services/InquiryService.php b/app/Services/InquiryService.php index 6a70f02..4738d8c 100644 --- a/app/Services/InquiryService.php +++ b/app/Services/InquiryService.php @@ -825,6 +825,8 @@ class InquiryService extends BaseService return fail(HttpEnumCode::HTTP_ERROR, "非法订单"); } + $order_inquiry = $order_inquiry->toArray(); + if ($order_inquiry['doctor_id'] != $user_info['client_user_id'] && $order_inquiry['patient_id'] != $user_info['client_user_id']){ return fail(HttpEnumCode::HTTP_ERROR, "操作失败"); } @@ -912,10 +914,8 @@ class InquiryService extends BaseService $MessagePush->finishInquiryToDoctor(); // 患者-发送通知消息-患者的问诊服务结束 - dump(11111111); $MessagePush = new MessagePush($order_inquiry['user_id'],$order_inquiry['order_inquiry_id']); $MessagePush->patientInquiryFinish(); - dump(222222222); }catch(\Exception $e){ return success([],HttpEnumCode::HTTP_SUCCESS,"消息发送失败"); }