|
|
@@ -3,7 +3,6 @@ package com.sckw.core.filter;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.sckw.core.config.CustomConfig;
|
|
|
import com.sckw.core.exception.SystemException;
|
|
|
-import com.sckw.core.model.constant.CacheGroup;
|
|
|
import com.sckw.core.model.constant.Global;
|
|
|
import com.sckw.core.utils.EncryUtil;
|
|
|
import com.sckw.core.utils.StringUtils;
|
|
|
@@ -16,7 +15,6 @@ import jakarta.annotation.PostConstruct;
|
|
|
import jakarta.servlet.*;
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
@@ -74,7 +72,7 @@ public class LoginFilter implements Filter {
|
|
|
}
|
|
|
|
|
|
//从redis获取用户信息
|
|
|
- Object object = RedissonUtils.get(CacheGroup.LOGININFO + key);
|
|
|
+ Object object = RedissonUtils.get(Global.REDIS_USER_PREFIX + key);
|
|
|
if (Objects.isNull(object)) {
|
|
|
throw new SystemException(HttpStatus.PARAMETERS_MISSING_CODE, HttpStatus.TOKEN_INVAILD);
|
|
|
}
|
|
|
@@ -94,7 +92,7 @@ public class LoginFilter implements Filter {
|
|
|
}
|
|
|
|
|
|
private void checkMenu(String key, String url) {
|
|
|
- if(!RedissonUtils.contains(CacheGroup.ACCESSMENU + key, url)) {
|
|
|
+ if(!RedissonUtils.contains(Global.REDIS_SYS_MENU_PREFIX + key, url)) {
|
|
|
throw new SystemException(HttpStatus.AUTHORITY_NO_CODE, HttpStatus.ACCESS_FIAL);
|
|
|
}
|
|
|
}
|