/*     */ package com.picc.grab.aop;
/*     */ 
/*     */ import com.picc.grab.common.shiro.ShiroExt;
/*     */ import com.picc.grab.config.SystemInfoProperties;
/*     */ import com.picc.grab.entity.ShiroUser;
/*     */ import java.util.Date;
/*     */ import java.util.List;
/*     */ import javax.servlet.http.HttpServletRequest;
/*     */ import org.apache.commons.collections.CollectionUtils;
/*     */ import org.aspectj.lang.ProceedingJoinPoint;
/*     */ import org.aspectj.lang.annotation.Around;
/*     */ import org.aspectj.lang.annotation.Aspect;
/*     */ import org.aspectj.lang.annotation.Pointcut;
/*     */ import org.slf4j.Logger;
/*     */ import org.slf4j.LoggerFactory;
/*     */ import org.springframework.beans.factory.annotation.Autowired;
/*     */ import org.springframework.context.annotation.Configuration;
/*     */ import org.springframework.web.context.request.RequestAttributes;
/*     */ import org.springframework.web.context.request.RequestContextHolder;
/*     */ import org.springframework.web.context.request.ServletRequestAttributes;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ @Aspect
/*     */ @Configuration
/*     */ public class AllControllerAop
/*     */ {
/*  31 */   private static final Logger logger = LoggerFactory.getLogger(AllControllerAop.class);
/*     */ 
/*     */   
/*     */   @Autowired
/*     */   private SystemInfoProperties systemInfoProperties;
/*     */ 
/*     */   
/*     */   @Pointcut("@annotation(com.picc.grab.aop.ResultFtlPage)")
/*     */   public void excudeService() {}
/*     */ 
/*     */   
/*     */   @Around("excudeService()")
/*     */   public Object doAround(ProceedingJoinPoint pjp) throws Throwable {
/*  44 */     RequestAttributes ra = RequestContextHolder.getRequestAttributes();
/*  45 */     ServletRequestAttributes sra = (ServletRequestAttributes)ra;
/*  46 */     HttpServletRequest request = sra.getRequest();
/*     */ 
/*     */     
/*  49 */     String url = request.getRequestURL().toString();
/*  50 */     String method = request.getMethod();
/*  51 */     String uri = request.getRequestURI();
/*  52 */     String queryString = request.getQueryString();
/*  53 */     logger.info("请求开始, 各个参数, url: {}, method: {}, uri: {}, params: {}", new Object[] { url, method, uri, queryString });
/*     */ 
/*     */     
/*  56 */     Object result = pjp.proceed();
/*     */ 
/*     */     
/*  59 */     request.setAttribute("ctxPath", url.replace(uri, ""));
/*     */     
/*  61 */     this.systemInfoProperties.setDatel((new Date()).getTime() + "");
/*  62 */     request.setAttribute("systemInfo", this.systemInfoProperties);
/*     */     
/*  64 */     ShiroExt shiroExt = new ShiroExt();
/*     */     
/*  66 */     request.setAttribute("shiro", shiroExt);
/*     */     
/*  68 */     ShiroUser user = shiroExt.getUser();
/*  69 */     List<String> ugList = (shiroExt.getUser()).ugIdList;
/*  70 */     if (CollectionUtils.isNotEmpty(ugList)) {
/*     */       
/*  72 */       if (ugList.contains("754878cf8c2c449abc1568806aba8516")) {
/*  73 */         request.setAttribute("systemGlyFz", Boolean.valueOf(true));
/*     */       } else {
/*  75 */         request.setAttribute("systemGlyFz", Boolean.valueOf(false));
/*     */       } 
/*     */       
/*  78 */       if (ugList.contains("6a1a0b0fba734efdb7dda8e353ca7477")) {
/*  79 */         request.setAttribute("userGroupZzyy", Boolean.valueOf(true));
/*     */       } else {
/*  81 */         request.setAttribute("userGroupZzyy", Boolean.valueOf(false));
/*     */       } 
/*  83 */       if (ugList.contains("59c57bd8a24f4d90aebd6135d1410c11")) {
/*  84 */         request.setAttribute("userGroupCw", Boolean.valueOf(true));
/*     */       } else {
/*  86 */         request.setAttribute("userGroupCw", Boolean.valueOf(false));
/*     */       } 
/*  88 */       if (ugList.contains("f075f4b77da645bb9b3a7bfb97f5dfe7")) {
/*  89 */         request.setAttribute("userGroupHYGL", Boolean.valueOf(true));
/*     */       } else {
/*  91 */         request.setAttribute("userGroupHYGL", Boolean.valueOf(false));
/*     */       } 
/*  93 */       if (ugList.contains("893482854b8346f29ed54932dbd83b83")) {
/*  94 */         request.setAttribute("userGroupKHJL", Boolean.valueOf(true));
/*     */       } else {
/*  96 */         request.setAttribute("userGroupKHJL", Boolean.valueOf(false));
/*     */       } 
/*     */     } 
/*     */ 
/*     */ 
/*     */     
/* 102 */     return result;
/*     */   }
/*     */ }


/* Location:              C:\Users\Administrator\Desktop\ROOT\WEB-INF\classes\!\com\picc\grab\aop\AllControllerAop.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */