| | |
| | | package com.zy.common.config; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.annotations.AppAuth; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | } |
| | | // 跨域设置 |
| | | // response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | |
| | | HandlerMethod appAuthHandlerMethod = (HandlerMethod) handler; |
| | | Method appAuthMethod = appAuthHandlerMethod.getMethod(); |
| | | if (appAuthMethod.isAnnotationPresent(AppAuth.class)){ |
| | | AppAuth annotation = method.getAnnotation(AppAuth.class); |
| | | if (annotation.value().equals(AppAuth.Auth.CHECK)){ |
| | | request.setAttribute("appAuth", annotation.memo()); |
| | | } |
| | | } |
| | | |
| | | if (method.isAnnotationPresent(ManagerAuth.class)) { |
| | | ManagerAuth annotation = method.getAnnotation(ManagerAuth.class); |
| | | if (annotation.value().equals(ManagerAuth.Auth.CHECK)) { |