whyclxw
2024-10-29 cdb8297d0f08ebff314ae726c5b21def9887ff75
src/main/java/com/whyc/webSocket/DevStaticSocket.java
@@ -5,6 +5,7 @@
import com.whyc.dto.ResultA200Dto;
import com.whyc.factory.ThreadPoolExecutorFactory;
import com.whyc.pojo.db_lithium_ram_db.DevInf;
import com.whyc.pojo.db_user.UserInf;
import com.whyc.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -53,9 +54,9 @@
    @OnOpen
    public void onOpen(Session session, EndpointConfig config){
        this.httpSession = (HttpSession) config.getUserProperties().get("httpSession");
        //UserInf user = (UserInf) this.httpSession.getAttribute("user");
        //final int userId = user.getUid();
        final int userId = 101;
        UserInf user = (UserInf) this.httpSession.getAttribute("user");
        final int userId = user.getUid();
        //final int userId = 101;
        Thread thread = new Thread() {
            @Override
            public void run() {