feat: 增加操作日志的操作人和操作时间

このコミットが含まれているのは:
weihongyang 2022-08-08 10:01:52 +08:00
コミット 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();