Pu Zhibing
2025-07-26 120f73549d7898b8239ffc21f3320a8dbad2c2b1
ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/core/aop/LogAop.java
@@ -18,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;
@@ -32,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();
@@ -68,7 +73,7 @@
        String methodName = currentMethod.getName();
        //如果当前用户未登录,不做日志
        ShiroUser user = ShiroExtUtil.getUser();
        ShiroUser user = shiroExtUtil.getUser();
        if (null == user) {
            return;
        }