From 28e5f18c4ccd67edc85db58660cdae19efad5cac Mon Sep 17 00:00:00 2001 From: thinkgem Date: Sat, 11 Oct 2025 21:55:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BD=93=E9=AA=8C=EF=BC=8C?= =?UTF-8?q?=E5=BD=93=E5=85=B3=E9=97=AD=E5=A4=9A=E5=9C=B0=E7=99=BB=E5=BD=95?= =?UTF-8?q?=EF=BC=8C=E4=B8=94=E8=A2=AB=E6=8C=A4=E4=B8=8B=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E7=BB=99=E4=BA=88=E7=94=A8=E6=88=B7=E6=8F=90=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E8=80=8C=E4=B8=8D=E6=98=AF=E7=9B=B4=E6=8E=A5=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/sys/web/OnlineController.java | 7 +++-- .../views/include/sysIndex/topMenuMsg.html | 1 - .../views/include/sysIndex/topMenuOnline.html | 31 ++++++++++++++----- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/modules/core/src/main/java/com/jeesite/modules/sys/web/OnlineController.java b/modules/core/src/main/java/com/jeesite/modules/sys/web/OnlineController.java index 0184bb37..974ee6ca 100644 --- a/modules/core/src/main/java/com/jeesite/modules/sys/web/OnlineController.java +++ b/modules/core/src/main/java/com/jeesite/modules/sys/web/OnlineController.java @@ -29,7 +29,9 @@ import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.util.*; +import java.util.Collection; +import java.util.List; +import java.util.Map; /** * 在线用户Controller @@ -51,6 +53,7 @@ public class OnlineController extends BaseController{ * @param response * @author ThinkGem */ + @RequiresPermissions("user") @RequestMapping(value = "count") @ResponseBody public Integer count(HttpServletRequest request, HttpServletResponse response) { @@ -158,7 +161,7 @@ public class OnlineController extends BaseController{ if (pc instanceof PrincipalCollection){ Object pp = ((PrincipalCollection)pc).getPrimaryPrincipal(); if (pp instanceof LoginInfo){ - LoginInfo loginInfo = ((LoginInfo)pp); + LoginInfo loginInfo = (LoginInfo)pp; String key = loginInfo.getId()+"_"+loginInfo.getParam("deviceType", "pc"); onlineTickOutMap.put(key, StringUtils.EMPTY); } diff --git a/modules/core/src/main/resources/views/include/sysIndex/topMenuMsg.html b/modules/core/src/main/resources/views/include/sysIndex/topMenuMsg.html index 1d7a2580..a899099f 100644 --- a/modules/core/src/main/resources/views/include/sysIndex/topMenuMsg.html +++ b/modules/core/src/main/resources/views/include/sysIndex/topMenuMsg.html @@ -11,7 +11,6 @@ data-mergeMsgLimit="${@Global.getConfig('sys.msg.mergeMsgLimit', '5')}" data-mergeMsgTitle="${text('系统消息')}" data-mergeMsgContent="${text('您有 {0\} 条新消息,由于消息太多,这里为您合并,请点击查看按钮看详情。')}" - data-loginTimeout="${text('您当前的会话已超时,请重新登录。')}" data-pullMsgPollingInterval="1000*60" data-showMsgCloseTimeout="1000*60"> diff --git a/modules/core/src/main/resources/views/include/sysIndex/topMenuOnline.html b/modules/core/src/main/resources/views/include/sysIndex/topMenuOnline.html index a10b178f..f9c55862 100644 --- a/modules/core/src/main/resources/views/include/sysIndex/topMenuOnline.html +++ b/modules/core/src/main/resources/views/include/sysIndex/topMenuOnline.html @@ -5,15 +5,32 @@