|
@ -32,6 +32,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
/**
|
|
@ -206,7 +207,17 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
|
|
|
@RequestParam(value = "doctorCode",required = false) String doctorCode
|
|
|
) throws Exception {
|
|
|
int resutl = imService.finish(consult,doctorCode,2);
|
|
|
return success(resutl);
|
|
|
BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doctorCode);
|
|
|
JSONObject msgObj = new JSONObject();
|
|
|
msgObj.put("msg",baseDoctorDO.getName()+"结束了咨询");
|
|
|
msgObj.put("consultcode",consult);
|
|
|
|
|
|
String jsonStr = "";
|
|
|
|
|
|
if(1 == resutl){
|
|
|
jsonStr = "{\"id\":\""+ UUID.randomUUID().toString()+"\",\"sender_id\":\""+doctorCode+"\",\"sender_name\":\"系统\",\"timestamp\":"+new Date().getTime()+",\"content_type\":7,\"content\":"+msgObj.toString()+",\"business_type\":1}";
|
|
|
}
|
|
|
return success(jsonStr);
|
|
|
}
|
|
|
|
|
|
|