作者 RuoYi

操作日志记录DELETE请求参数(IAMV6F)

@@ -172,8 +172,7 @@ public class LogAspect @@ -172,8 +172,7 @@ public class LogAspect
172 { 172 {
173 Map<?, ?> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest()); 173 Map<?, ?> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest());
174 String requestMethod = operLog.getRequestMethod(); 174 String requestMethod = operLog.getRequestMethod();
175 - if (StringUtils.isEmpty(paramsMap)  
176 - && (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))) 175 + if (StringUtils.isEmpty(paramsMap) && StringUtils.equalsAny(requestMethod, HttpMethod.PUT.name(), HttpMethod.POST.name(), HttpMethod.DELETE.name()))
177 { 176 {
178 String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames); 177 String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames);
179 operLog.setOperParam(StringUtils.substring(params, 0, 2000)); 178 operLog.setOperParam(StringUtils.substring(params, 0, 2000));