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},