增加钉钉数据同步日志
This commit is contained in:
parent
07e14e6c04
commit
0126366f95
|
@ -123,4 +123,12 @@ public class SysDingtalkSyncLogController extends BaseController
|
|||
{
|
||||
return toAjax(sysDingtalkSyncLogService.deleteSysDingtalkSyncLogByIds(ids));
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:log:detail")
|
||||
@GetMapping("/detail/{operId}")
|
||||
public String detail(@PathVariable("operId") Long operId, ModelMap mmap)
|
||||
{
|
||||
mmap.put("operLog", sysDingtalkSyncLogService.selectSysDingtalkSyncLogById(operId));
|
||||
return prefix + "/detail";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('操作日志详细')" />
|
||||
<th:block th:include="include :: jsonview-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m-t" id="signupForm">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">操作模块:</label>
|
||||
<div class="form-control-static" th:text="${operLog.title} + ' / ' + ${@dict.getLabel('sys_oper_type',operLog.businessType)}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">登录信息:</label>
|
||||
<div class="form-control-static" th:text="${operLog.operName} + ' / ' + ${operLog.deptName} + ' / ' + ${operLog.operIp}+ ' / ' + ${operLog.operLocation}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">请求地址:</label>
|
||||
<div class="form-control-static" th:text="${operLog.operUrl}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">请求方式:</label>
|
||||
<div class="form-control-static" th:text="${operLog.requestMethod}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">操作方法:</label>
|
||||
<div class="form-control-static" th:text="${operLog.method}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">请求参数:</label>
|
||||
<div class="form-control-static"><pre id="operParam"></pre></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">返回参数:</label>
|
||||
<div class="form-control-static"><pre id="jsonResult"></pre></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">状态:</label>
|
||||
<div class="form-control-static" th:class="${operLog.status == 0 ? 'label label-primary' : 'label label-danger'}" th:text="${operLog.status == 0 ? '正常' : '异常'}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" th:style="'display:' + ${operLog.status == 0 ? 'none' : 'block'}">
|
||||
<label class="col-sm-2 control-label">异常信息:</label>
|
||||
<div class="form-control-static" th:text="${operLog.errorMsg}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: jsonview-js" />
|
||||
<script th:inline="javascript">
|
||||
$(function() {
|
||||
var operParam = [[${operLog.operSourceParam}]];
|
||||
if ($.common.isNotEmpty(operParam) && operParam.length < 2000) {
|
||||
$("#operParam").JSONView(operParam);
|
||||
} else {
|
||||
$("#operParam").text(operParam);
|
||||
}
|
||||
var jsonResult = [[${operLog.jsonResult}]];
|
||||
if ($.common.isNotEmpty(jsonResult) && jsonResult.length < 2000) {
|
||||
$("#jsonResult").JSONView(jsonResult);
|
||||
} else {
|
||||
$("#jsonResult").text(jsonResult);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -110,6 +110,8 @@
|
|||
var removeFlag = [[${@permission.hasPermi('system:log:remove')}]];
|
||||
var moduleTypeDatas = [[${@dict.getType('dingtalk_module_type')}]];
|
||||
var businessTypeDatas = [[${@dict.getType('dingtalk_oper_type')}]];
|
||||
var syncTypeDatas = [[${@dict.getType('dingtalk_sync_type')}]];
|
||||
|
||||
var prefix = ctx + "system/log";
|
||||
|
||||
$(function() {
|
||||
|
@ -119,26 +121,28 @@
|
|||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "钉钉同步日志记录",
|
||||
detailUrl: prefix + "/detail/{id}",
|
||||
modalName: "钉钉同步日志",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'logId',
|
||||
title: '日志主键',
|
||||
visible: false
|
||||
title: '日志编号',
|
||||
visible: true
|
||||
},
|
||||
{
|
||||
field: 'moduleType',
|
||||
title: '模块类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(moduleTypeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '模块标题'
|
||||
},
|
||||
{
|
||||
field: 'moduleType',
|
||||
title: '模块类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(moduleTypeDatas, value);
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'businessType',
|
||||
title: '业务类型',
|
||||
|
@ -146,17 +150,20 @@
|
|||
return $.table.selectDictLabel(businessTypeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
/* {
|
||||
field: 'method',
|
||||
title: '方法名称'
|
||||
},
|
||||
},*/
|
||||
{
|
||||
field: 'requestMethod',
|
||||
title: '请求方式'
|
||||
},
|
||||
{
|
||||
field: 'operatorType',
|
||||
title: '操作类别'
|
||||
title: '操作类别',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(syncTypeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'operName',
|
||||
|
@ -166,10 +173,10 @@
|
|||
field: 'deptName',
|
||||
title: '部门名称'
|
||||
},
|
||||
{
|
||||
/* {
|
||||
field: 'operUrl',
|
||||
title: '请求URL'
|
||||
},
|
||||
},*/
|
||||
{
|
||||
field: 'operIp',
|
||||
title: '主机地址'
|
||||
|
@ -178,7 +185,7 @@
|
|||
field: 'operLocation',
|
||||
title: '操作地点'
|
||||
},
|
||||
{
|
||||
/* {
|
||||
field: 'operSourceParam',
|
||||
title: '请求原参数'
|
||||
},
|
||||
|
@ -189,15 +196,23 @@
|
|||
{
|
||||
field: 'jsonResult',
|
||||
title: '返回参数'
|
||||
},
|
||||
},*/
|
||||
{
|
||||
field: 'status',
|
||||
title: '操作状态'
|
||||
title: '操作状态',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
if (value == 0) {
|
||||
return '<span class="badge badge-primary">成功</span>';
|
||||
} else if (value == 1) {
|
||||
return '<span class="badge badge-danger">失败</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
/* {
|
||||
field: 'errorMsg',
|
||||
title: '错误消息'
|
||||
},
|
||||
},*/
|
||||
{
|
||||
field: 'operTime',
|
||||
title: '操作时间'
|
||||
|
@ -209,6 +224,7 @@
|
|||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.logId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.logId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.logId + '\')"><i class="fa fa-search"></i>详细</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
|
|
Loading…
Reference in New Issue