Merge branch 'jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支' of http://182.92.166.109:3000/jihan/xinelu-api into jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支

This commit is contained in:
haown 2023-10-24 16:15:52 +08:00
commit c29010f679
4 changed files with 19 additions and 0 deletions

View File

@ -40,6 +40,11 @@ public class MessageTemplate {
*/
private String msgType;
/**
* 消息类型(文字/图片)
*/
private String messageType;
/**
* 发送时间
* */

View File

@ -91,6 +91,7 @@ public class ChatRecordServiceImpl implements IChatRecordService {
msg.setFromKey(chatRecord.getSenderId().toString());
msg.setToKey(chatRecord.getRecipientId().toString());
msg.setMsgType(MessageContentType.CHAT.name());
msg.setMessageType(chatRecord.getMessageType());
msg.setSendTime(chatRecord.getSendTime());
return WebSocketUtils.sendMessage(chatRecord.getRecipientId().toString(), msg);
}

View File

@ -69,6 +69,8 @@
ci.doctor_name,
ci.problem_description,
ci.create_time,
(SELECT content FROM chat_record cr WHERE cr.consultation_id = ci.id ORDER BY create_time DESC LIMIT 1) as content,
(SELECT message_type FROM chat_record cr WHERE cr.consultation_id = ci.id ORDER BY create_time DESC LIMIT 1) as messageType,
(SELECT COUNT(cr.id) FROM chat_record cr WHERE cr.consultation_id = ci.id AND read_status = '0'
<if test="patientId != null ">
and sender_id= ci.doctor_id

View File

@ -118,6 +118,15 @@ public class ConsultationInfoVO extends BaseEntity implements Serializable {
*/
private String medicalRecord;
/**
* 最近一次内容
*/
private String content;
/**
* 内容类型
*/
private String messageType;
/**
* 是否删除标识01
*/
@ -152,6 +161,8 @@ public class ConsultationInfoVO extends BaseEntity implements Serializable {
.append("medicalRecord", getMedicalRecord())
.append("delFlag", getDelFlag())
.append("messageCount", getMessageCount())
.append("content", getContent())
.append("messageType", getMessageType())
.toString();
}
}