diff --git a/src/main/java/com/sjhy/plugin/actions/MainActionGroup.java b/src/main/java/com/sjhy/plugin/actions/MainActionGroup.java index 42128fe..5a4fd06 100644 --- a/src/main/java/com/sjhy/plugin/actions/MainActionGroup.java +++ b/src/main/java/com/sjhy/plugin/actions/MainActionGroup.java @@ -119,7 +119,7 @@ public class MainActionGroup extends ActionGroup { if (dbTable == null) { return; } - TableInfoSettingsService.getInstance().resetTableInfo(dbTable); + TableInfoSettingsService.getInstance().removeTableInfo(dbTable); Messages.showInfoMessage(dbTable.getName() + "表配置信息已重置成功", GlobalDict.TITLE_INFO); } }; diff --git a/src/main/java/com/sjhy/plugin/dto/TableInfoSettingsDTO.java b/src/main/java/com/sjhy/plugin/dto/TableInfoSettingsDTO.java index 525d6a6..8ea9f48 100644 --- a/src/main/java/com/sjhy/plugin/dto/TableInfoSettingsDTO.java +++ b/src/main/java/com/sjhy/plugin/dto/TableInfoSettingsDTO.java @@ -124,4 +124,14 @@ public class TableInfoSettingsDTO { String key = generateKey(dbTable); this.tableInfoMap.put(key, new TableInfoDTO(null, dbTable)); } + + /** + * 删除表信息 + * + * @param dbTable 数据库表 + */ + public void removeTableInfo(DbTable dbTable) { + String key = generateKey(dbTable); + this.tableInfoMap.remove(key); + } } diff --git a/src/main/java/com/sjhy/plugin/service/TableInfoSettingsService.java b/src/main/java/com/sjhy/plugin/service/TableInfoSettingsService.java index 7f1d80a..b5f1205 100644 --- a/src/main/java/com/sjhy/plugin/service/TableInfoSettingsService.java +++ b/src/main/java/com/sjhy/plugin/service/TableInfoSettingsService.java @@ -53,4 +53,11 @@ public interface TableInfoSettingsService extends PersistentStateComponent