正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
| @@ -164,15 +164,16 @@ public class LogAspect | @@ -164,15 +164,16 @@ public class LogAspect | ||
| 164 | */ | 164 | */ |
| 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 | + Map<?, ?> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest()); | ||
| 167 | String requestMethod = operLog.getRequestMethod(); | 168 | String requestMethod = operLog.getRequestMethod(); |
| 168 | - if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)) | 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 | } |
-
请 注册 或 登录 后发表评论