feat: 增加操作日志的操作人和操作时间
This commit is contained in:
förälder
c0f460e1e4
incheckning
16e656d820
@ -21,6 +21,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author weihongyang
|
||||
@ -78,6 +79,7 @@ public class LogOperationAspect {
|
||||
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
||||
if(loginUser != null){
|
||||
log.setCreatorName(loginUser.getUsername());
|
||||
log.setCreator(loginUser.getSysUserEntity().getCreator());
|
||||
}
|
||||
|
||||
log.setStatus(status);
|
||||
@ -89,6 +91,7 @@ public class LogOperationAspect {
|
||||
log.setUserAgent(request.getHeader(HttpHeaders.USER_AGENT));
|
||||
log.setRequestUri(request.getRequestURI());
|
||||
log.setRequestMethod(request.getMethod());
|
||||
log.setCreateDate(new Date());
|
||||
|
||||
//请求参数
|
||||
Object[] args = joinPoint.getArgs();
|
||||
|
Laddar…
Referens i nytt ärende
Block a user