|
@@ -165,14 +165,15 @@ public class LogAspect
|
|
165
|
private void setRequestValue(JoinPoint joinPoint, SysOperLog operLog, String[] excludeParamNames) throws Exception
|
165
|
private void setRequestValue(JoinPoint joinPoint, SysOperLog operLog, String[] excludeParamNames) throws Exception
|
|
166
|
{
|
166
|
{
|
|
167
|
String requestMethod = operLog.getRequestMethod();
|
167
|
String requestMethod = operLog.getRequestMethod();
|
|
168
|
- if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))
|
|
|
|
|
|
168
|
+ Map<?, ?> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest());
|
|
|
|
169
|
+ if (StringUtils.isEmpty(paramsMap)
|
|
|
|
170
|
+ && (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)))
|
|
169
|
{
|
171
|
{
|
|
170
|
String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames);
|
172
|
String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames);
|
|
171
|
operLog.setOperParam(StringUtils.substring(params, 0, 2000));
|
173
|
operLog.setOperParam(StringUtils.substring(params, 0, 2000));
|
|
172
|
}
|
174
|
}
|
|
173
|
else
|
175
|
else
|
|
174
|
{
|
176
|
{
|
|
175
|
- Map<?, ?> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest());
|
|
|
|
176
|
operLog.setOperParam(StringUtils.substring(JSON.toJSONString(paramsMap, excludePropertyPreFilter(excludeParamNames)), 0, 2000));
|
177
|
operLog.setOperParam(StringUtils.substring(JSON.toJSONString(paramsMap, excludePropertyPreFilter(excludeParamNames)), 0, 2000));
|
|
177
|
}
|
178
|
}
|
|
178
|
}
|
179
|
}
|