liukangdong
2024-05-11 b771d62db31bb113aff6db1be958ca83d591212f
server/system_service/src/main/java/com/doumee/config/cloudfilter/LoginHandlerInterceptor.java
@@ -32,6 +32,7 @@
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        if(handler instanceof HandlerMethod){
        HandlerMethod handlerMethod = (HandlerMethod) handler;
        Class<?> beanType = handlerMethod.getBeanType();
        if (!beanType.isAnnotationPresent(LoginNoRequired.class) && !handlerMethod.hasMethodAnnotation(LoginNoRequired.class)) {
@@ -72,6 +73,10 @@
                throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"未登录");
            }
        }
        }else{
            throw new BusinessException(ResponseStatus.NO_LOGIN.getCode(),"未登录");
        }
        return true;
    }