whyclxw
2025-05-14 423d378800ad0b9b9d805898312db2caec345385
苏州推送修改将默认用户改成session获取
1个文件已修改
8 ■■■■ 已修改文件
src/main/java/com/whyc/webSocket/ScreenForSZ2Socket.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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() {