修改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

@@ -19,7 +19,7 @@ public interface RemoteWebSocketMessageService {
* @param webSocketMsgType webSocket消息类型
* @param data 消息数据
*/
void publishMessage(List<Long> sessionKey, WebSocketMsgType webSocketMsgType, Object data);
void publishMessage(List<Long> sessionKey, WebSocketMsgType webSocketMsgType, String data);
/**
* 发布订阅的消息(群发)
@@ -27,7 +27,7 @@ public interface RemoteWebSocketMessageService {
* @param webSocketMsgType webSocket消息类型
* @param data 消息数据
*/
void publishAll(WebSocketMsgType webSocketMsgType, Object data);
void publishAll(WebSocketMsgType webSocketMsgType, String data);
/**
* 向指定的用户的指定会话发送消息
@@ -36,6 +36,6 @@ public interface RemoteWebSocketMessageService {
* @param webSocketMsgType webSocket消息类型
* @param data 消息数据
*/
void sendMessage(Long userId, WebSocketMsgType webSocketMsgType, Object data);
void sendMessage(Long userId, WebSocketMsgType webSocketMsgType, String data);
}

View File

@@ -7,8 +7,9 @@ package org.dromara.resource.api.domain;
*/
public enum WebSocketMsgType {
ALARM_MSG(100);
ALARM_MSG(100),
MOBILE_QRCODE(200);
/**
* 消息类型编码
* 大类型 - 100,200,300,400 累加100