1.增加操作日志操作地点、登录日志的登录地点、在线用户登录地点。

This commit is contained in:
yangzhengze
2018-05-29 01:37:23 +08:00
parent faf83c61cc
commit 1e66da2dd7
14 changed files with 75 additions and 14 deletions

View File

@ -3,6 +3,7 @@ package com.ruoyi.framework.aspectj;
import java.lang.reflect.Method;
import java.util.Map;
import com.ruoyi.common.utils.AddressUtils;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.AfterReturning;
@ -72,7 +73,7 @@ public class LogAspect
}
@Async
private void handleLog(final JoinPoint joinPoint, final Exception e)
protected void handleLog(final JoinPoint joinPoint, final Exception e)
{
try
{
@ -92,6 +93,9 @@ public class LogAspect
// 请求的地址
String ip = ShiroUtils.getIp();
operLog.setOperIp(ip);
//操作地点
operLog.setOperLocation(AddressUtils.getRealAddressByIP(ip));
operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
if (currentUser != null)
{