From cce41730933518ea6202c9a6fc313696c73631fa Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Fri, 26 Jul 2024 16:36:06 +0800 Subject: [PATCH] '111' --- .../com/ruoyi/framework/changeRecord/ChangeRecordAspect.java | 1 + .../com/ruoyi/framework/changeRecord/ChangeRecordLog.java | 3 +++ .../main/java/com/ruoyi/system/domain/SysChangeRecord.java | 5 +++++ .../main/resources/mapper/system/SysChangeRecordMapper.xml | 4 +++- ruoyi-ui/src/views/components/Tools/ChangeRecord/index.vue | 1 + 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/changeRecord/ChangeRecordAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/changeRecord/ChangeRecordAspect.java index dc70e67..554dd63 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/changeRecord/ChangeRecordAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/changeRecord/ChangeRecordAspect.java @@ -112,6 +112,7 @@ public class ChangeRecordAspect { changeRecord.setAfterChange(String.valueOf(dataMap.get("newValue"))); changeRecord.setTypeId(String.valueOf(dataMap.get(operateLog.tableId()))); changeRecord.setCodeName(String.valueOf(dataMap.get(operateLog.codeName()))); + changeRecord.setTitle(operateLog.title()); changeRecordMapper.insertChangeRecord(changeRecord); } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/changeRecord/ChangeRecordLog.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/changeRecord/ChangeRecordLog.java index 5bde3ee..39edd50 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/changeRecord/ChangeRecordLog.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/changeRecord/ChangeRecordLog.java @@ -31,4 +31,7 @@ public @interface ChangeRecordLog { //操作类型 String type() default "update"; + //操作事件 + String title() default ""; + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysChangeRecord.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysChangeRecord.java index b2e3130..66c95f7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysChangeRecord.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysChangeRecord.java @@ -8,6 +8,7 @@ public class SysChangeRecord { private String afterChange; private String typeId; private String codeName; + private String title; public String getChangeTime() { return changeTime; @@ -60,4 +61,8 @@ public class SysChangeRecord { public String getCodeName() { return codeName; } public void setCodeName(String codeName) { this.codeName = codeName; } + + public String getTitle() { return title; } + + public void setTitle(String title) { this.title = title; } } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysChangeRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysChangeRecordMapper.xml index 1144c69..9484dcd 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysChangeRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysChangeRecordMapper.xml @@ -13,6 +13,7 @@ afterChange, typeId, codeName, + title, #{changeTime}, @@ -22,12 +23,13 @@ #{afterChange}, #{typeId}, #{codeName}, + #{title},