日志备份功能

This commit is contained in:
lizhenhua 2024-07-24 19:26:35 +08:00
parent 998a4a0ee8
commit 27960bf472
2 changed files with 10 additions and 4 deletions

View File

@ -74,6 +74,7 @@ public class SysLogController extends BaseController {
@SysLog(title = "审计日志", module = "审计日志->系统日志", grade = OperaType.QUERY, details = "查询系统日志列表", type = "系统日志") @SysLog(title = "审计日志", module = "审计日志->系统日志", grade = OperaType.QUERY, details = "查询系统日志列表", type = "系统日志")
public TableDataInfo getSystemLogs(SysLogsVo dto) { public TableDataInfo getSystemLogs(SysLogsVo dto) {
try{ try{
dto.setOperType("查询");
dto.setLogType(0); dto.setLogType(0);
startPage(); startPage();
List<SysLogsVo> list = service.getSystemLogs(dto); List<SysLogsVo> list = service.getSystemLogs(dto);
@ -90,6 +91,7 @@ public class SysLogController extends BaseController {
public TableDataInfo getYwLogs(SysLogsVo dto) { public TableDataInfo getYwLogs(SysLogsVo dto) {
try{ try{
dto.setLogType(1); dto.setLogType(1);
dto.setOperType("查询");
startPage(); startPage();
List<SysLogsVo> list = service.getSystemLogs(dto); List<SysLogsVo> list = service.getSystemLogs(dto);
return getDataTable(list); return getDataTable(list);
@ -105,6 +107,7 @@ public class SysLogController extends BaseController {
public TableDataInfo getErrLogs(SysLogsVo dto) { public TableDataInfo getErrLogs(SysLogsVo dto) {
try{ try{
dto.setLogType(2); dto.setLogType(2);
dto.setOperType("查询");
startPage(); startPage();
List<SysLogsVo> list = service.getSystemLogs(dto); List<SysLogsVo> list = service.getSystemLogs(dto);
return getDataTable(list); return getDataTable(list);

View File

@ -95,10 +95,10 @@
<if test="model!=null and model!=''"> <if test="model!=null and model!=''">
and model LIKE concat('%',#{model},'%') and model LIKE concat('%',#{model},'%')
</if> </if>
<if test="operType!=null and operType!=''"> <if test="operType!=null and operType !=''">
and oper_type LIKE concat('%',#{operType},'%') and oper_type LIKE concat('%',#{operType},'%')
</if> </if>
<if test="params!=null and params!=''"> <if test="params!=null and params !=''">
and params LIKE concat('%',#{params},'%') and params LIKE concat('%',#{params},'%')
</if> </if>
@ -111,8 +111,11 @@
<if test="endTime!=null and endTime!=''"> <if test="endTime!=null and endTime!=''">
and oper_time BETWEEN concat(#{startTime}, ' 00:00:00') AND concat(#{endTime},' 23:59:59') and oper_time BETWEEN concat(#{startTime}, ' 00:00:00') AND concat(#{endTime},' 23:59:59')
</if> </if>
<if test="ip!=null and ip!=''"> <if test="ip !=null and ip!=''">
and ip=#{ip} and ip LIKE concat('%',#{ip},'%')
</if>
<if test="result !=null and result !=''">
and result LIKE concat('%',#{result},'%')
</if> </if>
<if test="logSort!=null and logDesc !=null and logSort!='' and logDesc!='' "> <if test="logSort!=null and logDesc !=null and logSort!='' and logDesc!='' ">
order by order by