代码优化

This commit is contained in:
smallchill 2018-12-24 13:23:56 +08:00
parent 8058ca9e06
commit a16289277e
3 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ public class ApiLogListener {
logApi.setRequestUri(URLUtil.getPath(request.getRequestURI()));
logApi.setMethod(request.getMethod());
logApi.setParams(WebUtil.getRequestParamString(request));
logApi.setCreateBy(SecureUtil.getUserAccount(request).getAccount());
logApi.setCreateBy(SecureUtil.getUserAccount(request));
logApi.setCreateTime(LocalDateTime.now());
logService.saveApiLog(logApi);
}

View File

@ -58,10 +58,10 @@ public class BladeLogListener {
logBlade.setUserAgent(request.getHeader(WebUtil.USER_AGENT_HEADER));
logBlade.setMethod(request.getMethod());
logBlade.setParams(WebUtil.getRequestParamString(request));
logBlade.setServiceId(bladeProperties.getName());
logBlade.setServerHost(serverInfo.getHostName());
logBlade.setServerIp(serverInfo.getIPWithPort());
logBlade.setServiceId(bladeProperties.getName());
logBlade.setEnv(bladeProperties.getEnv());
logBlade.setServerIp(serverInfo.getIPWithPort());
logBlade.setCreateBy(SecureUtil.getUserAccount(request));
logBlade.setCreateTime(LocalDateTime.now());
logService.saveBladeLog(logBlade);

View File

@ -60,7 +60,7 @@ public class ErrorLogListener {
logError.setServerHost(serverInfo.getHostName());
logError.setServerIp(serverInfo.getIPWithPort());
logError.setEnv(bladeProperties.getEnv());
logError.setCreateBy(SecureUtil.getUserAccount(request).getAccount());
logError.setCreateBy(SecureUtil.getUserAccount(request));
logError.setCreateTime(LocalDateTime.now());
logService.saveErrorLog(logError);
}