Browse Source

操作日志返回参数添加非空验证

pull/275/MERGE
RuoYi 4 years ago
parent
commit
9d3f806e0d
  1. 5
      ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java

5
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java

@ -89,7 +89,10 @@ public class LogAspect
String ip = ShiroUtils.getIp();
operLog.setOperIp(ip);
// 返回参数
operLog.setJsonResult(StringUtils.substring(JSON.marshal(jsonResult), 0, 2000));
if (StringUtils.isNotNull(jsonResult))
{
operLog.setJsonResult(StringUtils.substring(JSON.marshal(jsonResult), 0, 2000));
}
operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
if (currentUser != null)

Loading…
Cancel
Save