|
@@ -39,10 +39,6 @@ import java.util.*;
|
|
public class VisitLogInterceptor {
|
|
public class VisitLogInterceptor {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- private RedisUtil redisUtil;
|
|
|
|
- @Autowired
|
|
|
|
- private ISysUserService userService;
|
|
|
|
- @Autowired
|
|
|
|
ISysLogService sysLogService;
|
|
ISysLogService sysLogService;
|
|
|
|
|
|
@Value("${server.servlet.context-path:null}")
|
|
@Value("${server.servlet.context-path:null}")
|
|
@@ -54,7 +50,7 @@ public class VisitLogInterceptor {
|
|
}
|
|
}
|
|
|
|
|
|
@Around("privilege()")
|
|
@Around("privilege()")
|
|
- public Object around(ProceedingJoinPoint pjp) throws Throwable {
|
|
|
|
|
|
+ public Object around(ProceedingJoinPoint pjp) throws Throwable {
|
|
|
|
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
|
|
|
|
@@ -98,13 +94,6 @@ public class VisitLogInterceptor {
|
|
nickName = (String)StpUtil.getExtra("nickName");
|
|
nickName = (String)StpUtil.getExtra("nickName");
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- JSONObject paramObj = JSONObject.parseObject(params);
|
|
|
|
- userName = paramObj.getString("userName");
|
|
|
|
- SysUser sysUser = userService.getByUserName(userName);
|
|
|
|
- if(sysUser != null){
|
|
|
|
- userId = sysUser.getId();
|
|
|
|
- nickName = sysUser.getNickName();
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
//写入mongodb
|
|
//写入mongodb
|
|
SysLog operLog = new SysLog();
|
|
SysLog operLog = new SysLog();
|