修改发送IM消息-医生接诊
This commit is contained in:
parent
6cf434831e
commit
63be31aec0
@ -354,9 +354,10 @@ class ImService extends BaseService
|
||||
* @param array|object $order_inquiry 问诊订单数据
|
||||
* @param string $doctor_user_id 医生用户id
|
||||
* @param string $patient_user_id 患者用户id
|
||||
* @param float|int $time
|
||||
* @return void
|
||||
*/
|
||||
public function doctorInquiry(array|object $order_inquiry, string $doctor_user_id, string $patient_user_id): void
|
||||
public function doctorInquiry(array|object $order_inquiry, string $doctor_user_id, string $patient_user_id,float|int $time): void
|
||||
{
|
||||
try {
|
||||
// 发送消息
|
||||
@ -374,19 +375,16 @@ class ImService extends BaseService
|
||||
$message_content_data = array();
|
||||
$message_content_data['message_type'] = 1;
|
||||
|
||||
if ($order_inquiry['inquiry_type'] == 1) {
|
||||
$message_content_data['title'] = "—问诊已开始,本次问诊可持续24小时—";
|
||||
$message_content_data['desc'] = "医生已接诊,为提高沟通效率,您可一次性如实补充病情(具体症状,患病时长,用药情况及想咨询的问题等)。线上咨询不能代替面诊,医生建议仅供参考。";
|
||||
} elseif ($order_inquiry['inquiry_type'] == 2) {
|
||||
$message_content_data['title'] = "—问诊已开始,本次问诊可持续60分钟—";
|
||||
$message_content_data['desc'] = "医生已接诊,为提高沟通效率,您可一次性如实补充病情(具体症状,患病时长,就医用药情况及想咨询的问题等)。线上咨询不能代替面诊,医生建议仅供参考。";
|
||||
} elseif ($order_inquiry['inquiry_type'] == 3) {
|
||||
$message_content_data['title'] = "—问诊已开始,本次问诊可持续24小时—";
|
||||
$message_content_data['desc'] = "医生已接诊,为提高沟通效率,您可一次性如实补充病情(具体症状,患病时长,就医用药情况及想咨询的问题等)。线上咨询不能代替面诊,医生建议仅供参考。";
|
||||
} elseif ($order_inquiry['inquiry_type'] == 4) {
|
||||
$message_content_data['title'] = "—问诊已开始,本次问诊可持续30分钟—";
|
||||
$message_content_data['desc'] = "医生已接诊,为提高沟通效率,您可一次性如实补充病情(具体症状,患病时长,就医用药情况及想咨询的问题等)。线上咨询不能代替面诊,医生建议仅供参考。";
|
||||
$time = $time / 60 / 60;
|
||||
if ($time >= 1){
|
||||
$time = $time . "小时";
|
||||
}else{
|
||||
$time = $time * 60 . "分钟";
|
||||
}
|
||||
|
||||
$message_content_data['title'] = "—问诊已开始,本次问诊可持续{$time}—";
|
||||
$message_content_data['desc'] = "医生已接诊,为提高沟通效率,您可一次性如实补充病情(具体症状,患病时长,用药情况及想咨询的问题等)。线上咨询不能代替面诊,医生建议仅供参考。";
|
||||
|
||||
$message_content = [
|
||||
'Data' => json_encode($message_content_data, JSON_UNESCAPED_UNICODE),
|
||||
];
|
||||
@ -753,7 +751,7 @@ class ImService extends BaseService
|
||||
* 患者病例
|
||||
* @param array|object $order_inquiry
|
||||
* @param string $doctor_user_id
|
||||
* @param string $disease_desc
|
||||
* @param string|null $disease_desc
|
||||
* @return void
|
||||
*/
|
||||
public function patientCase(array|object $order_inquiry, string $doctor_user_id,string|null $disease_desc = ""): void
|
||||
|
||||
@ -1910,7 +1910,7 @@ class UserDoctorService extends BaseService
|
||||
|
||||
// 发送IM消息-医生接诊
|
||||
$imService = new ImService();
|
||||
$imService->doctorInquiry($order_inquiry,$user_info['user_id'],$order_inquiry['user_id']);
|
||||
$imService->doctorInquiry($order_inquiry,$user_info['user_id'],$order_inquiry['user_id'],$time);
|
||||
|
||||
// 发送IM消息-患者病例
|
||||
$imService->patientCase($order_inquiry,$user_doctor['user_id'],$order_inquiry_case['disease_desc']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user