更新
This commit is contained in:
@@ -283,6 +283,44 @@ class DiagnosisController extends BaseAdminController
|
||||
$result = DiagnosisLogic::getCallRecords($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取诊单关联的腾讯云 IM 单聊记录(admin_getroammsg)
|
||||
*/
|
||||
public function getImChatMessages()
|
||||
{
|
||||
$diagnosisId = (int)$this->request->get('diagnosis_id', 0);
|
||||
if ($diagnosisId <= 0) {
|
||||
return $this->fail('诊单ID不能为空');
|
||||
}
|
||||
$result = DiagnosisLogic::getImChatMessagesForDiagnosis($diagnosisId);
|
||||
if ($result === false) {
|
||||
return $this->fail(DiagnosisLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 绑定 TRTC 房间号到当前诊单通话记录(便于云端录制回调关联)
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function bindCallRoom()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
if (empty($params['diagnosis_id'])) {
|
||||
return $this->fail('诊单ID不能为空');
|
||||
}
|
||||
if (empty($params['room_id'])) {
|
||||
return $this->fail('房间号不能为空');
|
||||
}
|
||||
|
||||
$result = DiagnosisLogic::bindCallRoom($params);
|
||||
if ($result) {
|
||||
return $this->success('绑定成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(DiagnosisLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取患者通话签名(用于测试)
|
||||
* @return \think\response\Json
|
||||
|
||||
Reference in New Issue
Block a user