|
@@ -2,12 +2,14 @@ package com.jzg.aop.aspect;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
import com.jzg.annotation.Log;
|
|
import com.jzg.annotation.Log;
|
|
|
|
|
+import com.jzg.core.base.BaseController;
|
|
|
import com.jzg.entity.enums.BusinessStatus;
|
|
import com.jzg.entity.enums.BusinessStatus;
|
|
|
import com.jzg.entity.enums.HttpMethod;
|
|
import com.jzg.entity.enums.HttpMethod;
|
|
|
import com.jzg.entity.po.SysOperLog;
|
|
import com.jzg.entity.po.SysOperLog;
|
|
|
import com.jzg.filter.PropertyPreExcludeFilter;
|
|
import com.jzg.filter.PropertyPreExcludeFilter;
|
|
|
import com.jzg.manager.AsyncManager;
|
|
import com.jzg.manager.AsyncManager;
|
|
|
import com.jzg.manager.factory.AsyncFactory;
|
|
import com.jzg.manager.factory.AsyncFactory;
|
|
|
|
|
+import com.jzg.mapper.SysOperLogMapper;
|
|
|
import com.jzg.util.ip.IpUtils;
|
|
import com.jzg.util.ip.IpUtils;
|
|
|
import com.jzg.util.ServletUtils;
|
|
import com.jzg.util.ServletUtils;
|
|
|
import com.jzg.util.StringUtils;
|
|
import com.jzg.util.StringUtils;
|
|
@@ -21,6 +23,7 @@ import org.aspectj.lang.annotation.Aspect;
|
|
|
import org.aspectj.lang.annotation.Before;
|
|
import org.aspectj.lang.annotation.Before;
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.NamedThreadLocal;
|
|
import org.springframework.core.NamedThreadLocal;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.validation.BindingResult;
|
|
import org.springframework.validation.BindingResult;
|
|
@@ -46,6 +49,9 @@ public class LogAspect
|
|
|
/** 计算操作消耗时间 */
|
|
/** 计算操作消耗时间 */
|
|
|
private static final ThreadLocal<Long> TIME_THREADLOCAL = new NamedThreadLocal<Long>("Cost Time");
|
|
private static final ThreadLocal<Long> TIME_THREADLOCAL = new NamedThreadLocal<Long>("Cost Time");
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private BaseController baseController;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 处理请求前执行
|
|
* 处理请求前执行
|
|
|
*/
|
|
*/
|
|
@@ -83,6 +89,7 @@ public class LogAspect
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
// 获取当前的用户
|
|
// 获取当前的用户
|
|
|
|
|
+// String userName = baseController.getUserName();
|
|
|
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
|
|
|
|
|
|
// *========数据库日志=========*//
|
|
// *========数据库日志=========*//
|