This commit is contained in:
77
2024-04-27 16:48:51 +08:00
parent ee2b25ea43
commit f643d4a8df
19 changed files with 60 additions and 69 deletions

View File

@@ -90,6 +90,7 @@ public class LogAspect {
operLog.setOperName(loginUser.getUsername());
operLog.setUserType(loginUser.getUserType());
operLog.setDeptName(loginUser.getDeptName());
logString.append(String.format("currentUserId=%s;", loginUser.getUserId()));
}
}catch (Exception ex){
// not do
@@ -132,10 +133,12 @@ public class LogAspect {
// 获取参数的信息,传入到数据库中。
setRequestValue(joinPoint, operLog, log.excludeParamNames(),logString);
}
String jsonResultString = JsonUtils.toJsonString(jsonResult);
// 是否需要保存response参数和值
if (log.isSaveResponseData() && ObjectUtil.isNotNull(jsonResult)) {
String jsonResultString = JsonUtils.toJsonString(jsonResult);
operLog.setJsonResult(StringUtils.substring(jsonResultString, 0, 2000));
}
if(log.isPrintResponseData()){
logString.append(String.format("result=%s;",jsonResultString));
}
}