liujie
6 天以前 f86a01ae84b7ac759f009f751076814ee71cff14
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/core/aop/LogAop.java
@@ -1,5 +1,6 @@
package com.stylefeng.guns.core.aop;
import com.stylefeng.guns.core.beetl.ShiroExtUtil;
import com.stylefeng.guns.core.common.annotion.BussinessLog;
import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap;
import com.stylefeng.guns.core.log.LogManager;
@@ -17,8 +18,10 @@
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.lang.reflect.Method;
import java.util.Map;
@@ -31,16 +34,19 @@
@Aspect
@Component
public class LogAop {
    private Logger log = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private ShiroExtUtil shiroExtUtil;
    @Pointcut(value = "@annotation(com.stylefeng.guns.core.common.annotion.BussinessLog)")
    public void cutService() {
    }
    @Around("cutService()")
    public Object recordSysLog(ProceedingJoinPoint point) throws Throwable {
        //先执行业务
        Object result = point.proceed();
@@ -67,7 +73,7 @@
        String methodName = currentMethod.getName();
        //如果当前用户未登录,不做日志
        ShiroUser user = ShiroKit.getUser();
        ShiroUser user = shiroExtUtil.getUser();
        if (null == user) {
            return;
        }