| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.aliyun.openservices.ons.api.Admin; |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.entity.accept.AcceptData; |
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.Signature; |
| | | import org.aspectj.lang.annotation.Around; |
| | |
| | | |
| | | @Around("execution(public * com.yeshi.fanli.controller.admin..*.*(..))") |
| | | public Object verifyLoginState(ProceedingJoinPoint joinPoint) throws IOException { |
| | | |
| | | Object[] args = joinPoint.getArgs(); |
| | | Signature signature = joinPoint.getSignature(); |
| | | MethodSignature methodSignature = (MethodSignature) signature; |
| | | Method targetMethod = methodSignature.getMethod(); |
| | |
| | | } |
| | | } |
| | | |
| | | Object[] args = joinPoint.getArgs(); |
| | | String systemStr = request.getHeader("system"); |
| | | if (StringUtil.isNullOrEmpty(systemStr)) { |
| | | systemStr = SystemEnum.blks.name(); |
| | | } |
| | | |
| | | SystemEnum system = null; |
| | | |
| | | for (SystemEnum s : SystemEnum.values()) { |
| | | if (s.getName().equalsIgnoreCase(systemStr)) |
| | | system = s; |
| | | } |
| | | |
| | | AdminAcceptData acceptData = null; |
| | | for (Object obj : args) { |
| | | if (obj instanceof AdminAcceptData) { |
| | | acceptData = (AdminAcceptData) obj; |
| | | } |
| | | } |
| | | |
| | | if (acceptData != null) |
| | | acceptData.setSystem(system); |
| | | |
| | | Object obj = null; |
| | | |
| | | try { |