09-10-netty优化,将系统消息存储为JSON

This commit is contained in:
2025-09-11 17:18:51 +08:00
parent 6ace8b0dc2
commit 47b0a4b087

View File

@ -383,7 +383,7 @@ public class ChatServerHandler extends SimpleChannelInboundHandler<TextWebSocket
//发送方设置为99 表示系统消息 //发送方设置为99 表示系统消息
chatHistory.setSenderId(99L); chatHistory.setSenderId(99L);
chatHistory.setGeterId(groupServiceOne.getId()); chatHistory.setGeterId(groupServiceOne.getId());
chatHistory.setMessage(message); chatHistory.setMessage(jsonObject.toString());
chatHistory.setMessageDate(new Date()); chatHistory.setMessageDate(new Date());
chatHistory.setIsRead("1");//未读 chatHistory.setIsRead("1");//未读
chatHistoryService.save(chatHistory); chatHistoryService.save(chatHistory);