From 1ef84ea35789364b18cd7270977d23169cadcb95 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期日, 06 九月 2026 23:40:06 +0800
Subject: [PATCH] 实现对比报表整份删除与最小操作日志
---
ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
index 201db07..3ab9300 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
@@ -73,6 +73,8 @@
<foreach collection="array" item="operId" open="(" separator="," close=")">
#{operId}
</foreach>
+ <!-- 报表删除只保留这一份最小追溯记录,平台日志清理也不能移除。 -->
+ and (method is null or method <> 'compare-report.delete')
</delete>
<select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult">
@@ -81,7 +83,7 @@
</select>
<update id="cleanOperLog">
- truncate table sys_oper_log
+ delete from sys_oper_log where method is null or method <> 'compare-report.delete'
</update>
-</mapper>
\ No newline at end of file
+</mapper>
--
Gitblit v1.7.1