zhoupeng 2 years ago
parent
commit
6cae1bac52

+ 0 - 2
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/config/WebSocket.java

@@ -5,7 +5,6 @@ import com.example.opc_common.enums.ResultEnum;
 import com.example.opc_common.exception.CustomException;
 import com.example.opc_common.util.Blank;
 import com.example.opc_common.util.ConstantStr;
-import com.example.opc_common.util.DateUtil;
 import com.example.opc_da.util.RedisUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -18,7 +17,6 @@ import javax.websocket.Session;
 import javax.websocket.server.PathParam;
 import javax.websocket.server.ServerEndpoint;
 import java.io.IOException;
-import java.util.Date;
 import java.util.concurrent.CopyOnWriteArraySet;
 
 @Component

+ 8 - 8
chaunyi_opc/opc_da/src/main/java/com/example/opc_da/service/impl/UserServiceImpl.java

@@ -193,10 +193,10 @@ public class UserServiceImpl implements UserService {
         }
         switch (isExistUser.getState()) {
             case ConstantStr.NORMAL_USE:
-                String userId = Convert.toStr(redisUtil.get(ConstantStr.BACK_USER_String + isExistUser.getUserId()));
-                if (Blank.isNotEmpty(userId)) {
-                    return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), "此账号在其他地方登录,请勿重新登录");
-                }
+//                String userId = Convert.toStr(redisUtil.get(ConstantStr.BACK_USER_String + isExistUser.getUserId()));
+//                if (Blank.isNotEmpty(userId)) {
+//                    return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), "此账号在其他地方登录,请勿重新登录");
+//                }
                 List<Role> roleList = userDao.getRoleListByUserId(isExistUser.getUserId());
                 JSONObject json = new JSONObject();
                 isExistUser.setPassword("");
@@ -598,10 +598,10 @@ public class UserServiceImpl implements UserService {
         redisUtil.del(user.getUid() + "-captcha");
         switch (isExistUser.getState()) {
             case ConstantStr.NORMAL_USE:
-                String userId = Convert.toStr(redisUtil.get(ConstantStr.PHONE_USER_String + isExistUser.getUserId()));
-                if (Blank.isNotEmpty(userId)) {
-                    return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), "此账号在其他地方登录,请勿重新登录");
-                }
+//                String userId = Convert.toStr(redisUtil.get(ConstantStr.PHONE_USER_String + isExistUser.getUserId()));
+//                if (Blank.isNotEmpty(userId)) {
+//                    return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), "此账号在其他地方登录,请勿重新登录");
+//                }
                 JSONObject json = new JSONObject();
                 isExistUser.setPassword("");
                 //生成token