新增问诊结束消息通知

This commit is contained in:
wucongxing 2023-05-04 10:53:33 +08:00
parent 06fa3e6efd
commit 6c1a44ca8e
2 changed files with 5 additions and 6 deletions

View File

@ -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;
}
}

View File

@ -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,"消息发送失败");
}