修改问诊订单结束推送问题

This commit is contained in:
wucongxing 2023-04-23 16:28:56 +08:00
parent 2030ea8f46
commit 4f90976923
2 changed files with 51 additions and 50 deletions

View File

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

View File

@ -311,7 +311,6 @@ class MessagePush extends BaseService
throw new BusinessException("加入推送队列失败:医生数据为空");
}
if ($this->push_type == 1) {
// 站内
// 服务消息
$inquiry_type_string = inquiryTypeToString($this->order_inquiry['inquiry_type']);
@ -341,7 +340,7 @@ class MessagePush extends BaseService
if (!$result) {
throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE));
}
} elseif ($this->push_type == 2) {
// 订阅
$sub_data = array();
$sub_data['push_user_id'] = $this->user['user_id'];
@ -364,7 +363,6 @@ class MessagePush extends BaseService
if (!$result) {
throw new BusinessException("加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE));
}
}
} catch (\Exception $e) {
throw new BusinessException("加入推送队列失败" . $e->getMessage());
}
@ -493,13 +491,14 @@ class MessagePush extends BaseService
}
/**
* 优惠劵发放
* 患者-优惠劵发放
* 站内
* @param string $coupon_name
* @return bool
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function patientDistributeCoupon(): bool
public function patientDistributeCoupon(string $coupon_name): bool
{
try {
$data = array();
@ -508,7 +507,7 @@ class MessagePush extends BaseService
$data['notice_system_type'] = 2; // 系统消息类型(患者端系统消息存在 1:服务消息 2:福利消息 3:退款消息 4:物流消息)
$data['from_name'] = "肝胆小秘书";
$data['notice_brief_title'] = "有新的优惠券已下发至您的账户,点击查看详情。";
$data['notice_title'] = "优惠劵名称】已到账";
$data['notice_title'] = "{$coupon_name}】已到账";
$data['notice_content'] = "有新的优惠劵已下发至您的账户中,点击查看详情!";
$data['link_type'] = 7;