From 49f101308f903a784235c09192de63c8c385e2a0 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期六, 25 五月 2024 10:05:56 +0800 Subject: [PATCH] !543 回退 'Pull Request !542 : 更新SnailJob版本到1.0.0-beta2' Merge pull request !543 from 疯狂的狮子Li/revert-merge-542-dev --- ruoyi-common/ruoyi-common-websocket/src/main/java/org/dromara/common/websocket/holder/WebSocketSessionHolder.java | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/ruoyi-common/ruoyi-common-websocket/src/main/java/org/dromara/common/websocket/holder/WebSocketSessionHolder.java b/ruoyi-common/ruoyi-common-websocket/src/main/java/org/dromara/common/websocket/holder/WebSocketSessionHolder.java index 9b93193..de8c5a7 100644 --- a/ruoyi-common/ruoyi-common-websocket/src/main/java/org/dromara/common/websocket/holder/WebSocketSessionHolder.java +++ b/ruoyi-common/ruoyi-common-websocket/src/main/java/org/dromara/common/websocket/holder/WebSocketSessionHolder.java @@ -5,6 +5,7 @@ import org.springframework.web.socket.WebSocketSession; import java.util.Map; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; /** @@ -31,6 +32,10 @@ return USER_SESSION_MAP.get(sessionKey); } + public static Set<Long> getSessionsAll() { + return USER_SESSION_MAP.keySet(); + } + public static Boolean existSession(Long sessionKey) { return USER_SESSION_MAP.containsKey(sessionKey); } -- Gitblit v1.9.3