修改消息推送
This commit is contained in:
@@ -187,7 +187,7 @@ class AssignDoctorConsumer extends ConsumerMessage
|
||||
return Result::ACK;
|
||||
}
|
||||
|
||||
// 发送问诊消息-等待医生接诊
|
||||
// 发送IM消息-等待医生接诊
|
||||
$imService = new ImService();
|
||||
$imService->waitDoctorInquiry($order_inquiry,$user_doctor['user_id'],$order_inquiry['user_id']);
|
||||
|
||||
|
||||
@@ -149,8 +149,6 @@ class CancelUnInquiryOrdersDelayDirectConsumer extends ConsumerMessage
|
||||
Log::getInstance()->info("取消未接诊问诊订单成功,发送IM消息");
|
||||
|
||||
try {
|
||||
$ImService = new ImService();
|
||||
|
||||
// 获取订单医生数据
|
||||
$params = array();
|
||||
$params['doctor_id'] = $order_inquiry['doctor_id'];
|
||||
@@ -159,28 +157,12 @@ class CancelUnInquiryOrdersDelayDirectConsumer extends ConsumerMessage
|
||||
Log::getInstance()->info("取消未接诊问诊订单成功,发送IM消息失败:医生数据错误");
|
||||
}
|
||||
|
||||
// 发送消息
|
||||
// 自定义消息
|
||||
$cloud_custom_data = array();
|
||||
$cloud_custom_data['order_inquiry_id'] = $order_inquiry['order_inquiry_id'];
|
||||
$cloud_custom_data['is_system'] = 1;
|
||||
$cloud_custom_data['inquiry_type'] = $order_inquiry['inquiry_type'];
|
||||
$cloud_custom_data['message_rounds'] = 0;
|
||||
$cloud_custom_data['patient_family_data']['patient_name'] = $order_inquiry['patient_name'];
|
||||
$cloud_custom_data['patient_family_data']['patient_sex'] = $order_inquiry['patient_sex'];
|
||||
$cloud_custom_data['patient_family_data']['patient_age'] = $order_inquiry['patient_age'];
|
||||
// 发送IM消息-医生未接诊
|
||||
$imService = new ImService();
|
||||
$imService->doctorUnInquiry($order_inquiry,$user_doctor['user_id'],$order_inquiry['user_id']);
|
||||
|
||||
// 消息内容
|
||||
$message_content_data = array();
|
||||
$message_content_data['message_type'] = 1;
|
||||
$message_content_data['content'] = "--医生未接诊--";
|
||||
$message_content_data['desc'] = "医生因工作繁忙,未能接诊和您沟通希望见谅。平台在24小时内进行退款,钱会退回至原账户中。";
|
||||
|
||||
$message_content = [
|
||||
'Data' => json_encode($message_content_data,JSON_UNESCAPED_UNICODE),
|
||||
];
|
||||
|
||||
$ImService->sendMessage($user_doctor['user_id'], $order_inquiry['user_id'], $message_content, "TIMCustomElem", $cloud_custom_data);
|
||||
// 发送IM消息-问诊退款
|
||||
$imService->inquiryRefund($order_inquiry,$user_doctor['user_id'],$order_inquiry['user_id']);
|
||||
|
||||
Log::getInstance()->info("取消未接诊问诊订单成功,发送IM消息成功");
|
||||
} catch (\Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user