|
|
@@ -9,12 +9,13 @@ import cn.hutool.http.useragent.UserAgentUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.common.constant.ServerCode;
|
|
|
+import com.fdkankan.common.util.SecurityUtil;
|
|
|
import com.fdkankan.manage.config.SaTokenConfigure;
|
|
|
-import com.fdkankan.manage.entity.OperLog;
|
|
|
+import com.fdkankan.manage.entity.SysLog;
|
|
|
import com.fdkankan.manage.entity.SysUser;
|
|
|
+import com.fdkankan.manage.service.ISysLogService;
|
|
|
import com.fdkankan.manage.service.ISysUserService;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
import org.aspectj.lang.JoinPoint;
|
|
|
import org.aspectj.lang.ProceedingJoinPoint;
|
|
|
import org.aspectj.lang.annotation.Around;
|
|
|
@@ -23,7 +24,6 @@ import org.aspectj.lang.annotation.Pointcut;
|
|
|
import org.aspectj.lang.reflect.MethodSignature;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.data.mongodb.core.MongoTemplate;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
@@ -36,14 +36,13 @@ import java.util.*;
|
|
|
|
|
|
@Component
|
|
|
@Aspect
|
|
|
-@Slf4j
|
|
|
public class VisitLogInterceptor {
|
|
|
|
|
|
@Autowired
|
|
|
private RedisUtil redisUtil;
|
|
|
-
|
|
|
@Autowired
|
|
|
- private MongoTemplate mongoTemplate;
|
|
|
+ ISysLogService sysLogService;
|
|
|
+
|
|
|
|
|
|
@Autowired
|
|
|
private ISysUserService userService;
|
|
|
@@ -115,7 +114,7 @@ public class VisitLogInterceptor {
|
|
|
// return result;
|
|
|
// }
|
|
|
//写入mongodb
|
|
|
- OperLog operLog = new OperLog();
|
|
|
+ SysLog operLog = new SysLog();
|
|
|
operLog.setUserId(userId);
|
|
|
operLog.setUserName(userName);
|
|
|
operLog.setNickName(nickName);
|
|
|
@@ -128,7 +127,7 @@ public class VisitLogInterceptor {
|
|
|
operLog.setCreateTime(Calendar.getInstance().getTime());
|
|
|
operLog.setResult(msg);
|
|
|
operLog.setOperationType("manage");
|
|
|
- mongoTemplate.insert(operLog);
|
|
|
+ sysLogService.save(operLog);
|
|
|
|
|
|
return result;
|
|
|
}
|