From 423d378800ad0b9b9d805898312db2caec345385 Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期三, 14 五月 2025 09:21:05 +0800 Subject: [PATCH] 苏州推送修改将默认用户改成session获取 --- src/main/java/com/whyc/webSocket/ScreenForSZ2Socket.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/whyc/webSocket/ScreenForSZ2Socket.java b/src/main/java/com/whyc/webSocket/ScreenForSZ2Socket.java index e3ab15e..8ac6bb6 100644 --- a/src/main/java/com/whyc/webSocket/ScreenForSZ2Socket.java +++ b/src/main/java/com/whyc/webSocket/ScreenForSZ2Socket.java @@ -64,10 +64,10 @@ @OnOpen public void onOpen(Session session, EndpointConfig config){ this.session = session; - //HttpSession httpSession = (HttpSession) config.getUserProperties().get("httpSession"); - //UserInf user = (UserInf) httpSession.getAttribute("user"); - //final int userId = user.getUId().intValue(); - final int userId = 1001; + HttpSession httpSession = (HttpSession) config.getUserProperties().get("httpSession"); + UserInf user = (UserInf) httpSession.getAttribute("user"); + final int userId = user.getUId().intValue(); + //final int userId = 1001; Thread thread = new Thread() { @Override public void run() { -- Gitblit v1.9.1