修改websocket配置

This commit is contained in:
lxj
2025-09-13 09:59:36 +08:00
parent d2799a280c
commit 727c8e06ce
7 changed files with 66 additions and 68 deletions

View File

@@ -22,7 +22,7 @@ import java.util.List;
public class RemoteWebSocketMessageServiceImpl implements RemoteWebSocketMessageService {
@Override
public void publishMessage(List<Long> sessionKey, WebSocketMsgType webSocketMsgType, Object data) {
public void publishMessage(List<Long> sessionKey, WebSocketMsgType webSocketMsgType, String data) {
WebSocketMessageDto dto = new WebSocketMessageDto();
dto.setSessionKeys(sessionKey);
dto.setMessage(createMsg(webSocketMsgType, data));
@@ -34,7 +34,7 @@ public class RemoteWebSocketMessageServiceImpl implements RemoteWebSocketMessage
}
@Override
public void publishAll(WebSocketMsgType webSocketMsgType, Object data) {
public void publishAll(WebSocketMsgType webSocketMsgType, String data) {
try {
WebSocketUtils.publishAll(createMsg(webSocketMsgType, data));
} catch (Exception e) {
@@ -44,7 +44,7 @@ public class RemoteWebSocketMessageServiceImpl implements RemoteWebSocketMessage
}
@Override
public void sendMessage(Long userId, WebSocketMsgType webSocketMsgType, Object data) {
public void sendMessage(Long userId, WebSocketMsgType webSocketMsgType, String data) {
try {
WebSocketUtils.sendMessage(userId, createMsg(webSocketMsgType, data));
} catch (Exception e) {