init
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user