提交 0d74da55 编写于 作者: lakernote's avatar lakernote

(bugfix)[整体](行为日志修改显示异常的判断)

上级 a1c6bf20
......@@ -3,6 +3,9 @@ package com.laker.admin.framework.aop;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.useragent.UserAgent;
import cn.hutool.json.JSON;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.laker.admin.module.ext.entity.ExtLog;
import com.laker.admin.module.ext.service.IExtLogService;
......@@ -80,6 +83,11 @@ public class MetricsAspect {
if (StrUtil.isNotBlank(response) && response.length() <= 500) {
logBean.setResponse(response);
}
JSON json = JSONUtil.parse(response);
if (json instanceof JSONObject) {
Boolean success = JSONUtil.parseObj(response).getBool("success", true);
logBean.setStatus(success);
}
extLogService.save(logBean);
return returnValue;
}
......
......@@ -55,11 +55,11 @@
</script>
<script type="text/html" id="log-bar">
{{#if (d.status) { }}
<button class="pear-btn pear-btn-sm pear-btn-success" lay-event="edit2">
<button class="pear-btn pear-btn-sm pear-btn-success">
成功
</button>
{{# }else if(!d.status){ }}
<button class="pear-btn pear-btn-sm pear-btn-danger"><i class="layui-icon layui-icon-help"></i>
<button class="pear-btn pear-btn-sm pear-btn-danger">
异常
</button>
{{# } }}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册