|
|
@@ -4,7 +4,6 @@ import java.io.IOException;
|
|
|
import java.util.Map;
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.socket.CloseStatus;
|
|
|
import org.springframework.web.socket.TextMessage;
|
|
|
@@ -13,8 +12,6 @@ import org.springframework.web.socket.WebSocketMessage;
|
|
|
import org.springframework.web.socket.WebSocketSession;
|
|
|
|
|
|
import com.goafanti.common.utils.LoggerUtils;
|
|
|
-import com.goafanti.core.mybatis.JDBCIdGenerator;
|
|
|
-import com.goafanti.core.shiro.token.TokenManager;
|
|
|
|
|
|
@Service
|
|
|
public class SystemWebSocketHandler implements WebSocketHandler {
|
|
|
@@ -26,10 +23,6 @@ public class SystemWebSocketHandler implements WebSocketHandler {
|
|
|
@Override
|
|
|
public void afterConnectionEstablished(WebSocketSession session) throws Exception {
|
|
|
String userId = (String) session.getAttributes().get(Constants.WEBSOCKET_USERNAME);
|
|
|
- if (userId==null) {
|
|
|
- userId=TokenManager.getAdminId();
|
|
|
- }
|
|
|
- LoggerUtils.debug(getClass(), "websoucket未找到uid" + userId);
|
|
|
if (userId != null) {
|
|
|
users.put(userId, session);
|
|
|
LoggerUtils.debug(getClass(), "添加用户websocket:" + userId);
|