正在修正im 新增患者问诊限制
This commit is contained in:
+33
-11
@@ -3,6 +3,7 @@
|
||||
namespace App\Services;
|
||||
|
||||
use App\Constants\DoctorTitleCode;
|
||||
use App\Constants\HttpEnumCode;
|
||||
use App\Exception\BusinessException;
|
||||
use App\Model\Hospital;
|
||||
use App\Model\User;
|
||||
@@ -215,17 +216,6 @@ class ImService extends BaseService
|
||||
$redis->hSet($redis_key,$hash_key,json_encode($content,JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送文本消息
|
||||
* @param string $from_user_id 发送者id
|
||||
* @param string $to_user_id 接受者id
|
||||
* @param string $content 内容
|
||||
* @param string $order_inquiry_id 订单id
|
||||
* @param int $inquiry_type
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
|
||||
/**
|
||||
* 发送消息
|
||||
* @param string $from_user_id 发送者id
|
||||
@@ -278,4 +268,36 @@ class ImService extends BaseService
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 问诊已结束
|
||||
public function sendInquiryEnd(array $order_inquiry,string $from_user_id){
|
||||
try {
|
||||
|
||||
} catch (\Exception $e) {
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
|
||||
// 发送消息
|
||||
$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'];
|
||||
|
||||
// 消息内容
|
||||
$message_content_data = array();
|
||||
$message_content_data['message_type'] = 1;
|
||||
$message_content_data['title'] = "问诊已结束";
|
||||
$message_content_data['desc'] = "线上咨询不能代替问诊,医生的回复仅为建议。";
|
||||
$message_content = [
|
||||
'Data' => json_encode($message_content_data,JSON_UNESCAPED_UNICODE),
|
||||
];
|
||||
|
||||
$this->sendMessage($from_user_id, $order_inquiry['user_id'], $message_content, "TIMCustomElem", $cloud_custom_data);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user