From 42128cb41c46b240f18f4aa132c142db0138b3ed Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期一, 17 十月 2022 17:53:49 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/interceptor/AuthInterceptor.java |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/lf/server/interceptor/AuthInterceptor.java b/src/main/java/com/lf/server/interceptor/AuthInterceptor.java
index 30e9a57..fe649c0 100644
--- a/src/main/java/com/lf/server/interceptor/AuthInterceptor.java
+++ b/src/main/java/com/lf/server/interceptor/AuthInterceptor.java
@@ -5,12 +5,10 @@
 import com.lf.server.entity.sys.UserEntity;
 import com.lf.server.helper.StringHelper;
 import com.lf.server.helper.WebHelper;
-import com.lf.server.service.all.RedisService;
 import com.lf.server.service.sys.TokenService;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.cache.RedisCache;
 import org.springframework.web.method.HandlerMethod;
 import org.springframework.web.servlet.HandlerInterceptor;
 
@@ -30,6 +28,8 @@
     private static final String NO_TOKEN = JSON.toJSONString(new ResponseMsg<String>(HttpStatus.TOKEN_ERROR, "鎵句笉鍒颁护鐗�"));
 
     private static final String NO_LOGIN = JSON.toJSONString(new ResponseMsg<String>(HttpStatus.NO_LOGIN_ERROR, "鐢ㄦ埛鏈櫥褰�"));
+
+    private static final String USER_LOCK = JSON.toJSONString(new ResponseMsg<String>(HttpStatus.USER_LOCK_ERROR, "鐢ㄦ埛ID宸茬鐢�"));
 
     public AuthInterceptor(TokenService tokenService) {
         this.tokenService = tokenService;
@@ -62,9 +62,8 @@
                 return WebHelper.write2Page(response, NO_LOGIN);
             }
 
-            Object objCount = tokenService.redisService.get(RedisCacheKey.signPwdError(ue.getUid()));
-            if (objCount != null && (int) objCount > SettingData.PWD_ERR_COUNT) {
-                return WebHelper.write2Page(response, JSON.toJSONString(new ResponseMsg<String>(HttpStatus.NO_LOGIN_ERROR, SettingData.PWD_ERR_TIME + "鍒嗛挓鍐呯姝㈢櫥褰�")));
+            if (tokenService.isUidDisable(ue)) {
+                return WebHelper.write2Page(response, USER_LOCK);
             }
 
             // noinspection AlibabaRemoveCommentedCode

--
Gitblit v1.9.3