【增加会话群组加入socket消息字段】

This commit is contained in:
weizhihong 2023-05-22 15:14:57 +08:00
parent 803d1a761f
commit bf93d15082

View File

@ -1,6 +1,7 @@
package club.joylink.rtss.simulation.cbtc.data.vo; package club.joylink.rtss.simulation.cbtc.data.vo;
import club.joylink.rtss.simulation.cbtc.conversation.ConversationGroup; import club.joylink.rtss.simulation.cbtc.conversation.ConversationGroup;
import club.joylink.rtss.simulation.cbtc.conversation.ConversationType;
import club.joylink.rtss.simulation.cbtc.member.SimulationMember; import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -28,6 +29,10 @@ public class ConversationGroupSocketMessageVO {
*/ */
private String creatorId; private String creatorId;
private String imageUrl;
private String leaderId;
/** /**
* 成员列表 * 成员列表
*/ */
@ -38,6 +43,8 @@ public class ConversationGroupSocketMessageVO {
*/ */
private ConversationGroupMessageVO message; private ConversationGroupMessageVO message;
private ConversationType type;
/** /**
* 消息类型 * 消息类型
*/ */
@ -58,6 +65,9 @@ public class ConversationGroupSocketMessageVO {
messageVO.name = group.getName(); messageVO.name = group.getName();
messageVO.creatorId = group.getCreator() != null ? group.getCreator().getId() : null; messageVO.creatorId = group.getCreator() != null ? group.getCreator().getId() : null;
messageVO.memberList = group.getMemberList().stream().map(ConversationMemberVO::new).collect(Collectors.toList()); messageVO.memberList = group.getMemberList().stream().map(ConversationMemberVO::new).collect(Collectors.toList());
messageVO.imageUrl = group.getImageUrl();
messageVO.leaderId = group.getLeader().getId();
messageVO.type = group.getType();
messageVO.messageType = MessageType.JOIN; messageVO.messageType = MessageType.JOIN;
return messageVO; return messageVO;
} }