From 8c6b4438e46c39b0cf039582f7fffc43c3e692a8 Mon Sep 17 00:00:00 2001 From: makejava <1353036300@qq.com> Date: Wed, 6 Jul 2022 15:30:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A9=E7=94=A8=E5=88=A0=E9=99=A4=E8=A1=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BB=A3=E6=9B=BF=E9=87=8D=E7=BD=AE=E8=A1=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E8=A7=A3=E5=86=B3=E8=A1=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=AD=89=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/sjhy/plugin/actions/MainActionGroup.java | 2 +- .../java/com/sjhy/plugin/dto/TableInfoSettingsDTO.java | 10 ++++++++++ .../sjhy/plugin/service/TableInfoSettingsService.java | 7 +++++++ .../service/impl/TableInfoSettingsServiceImpl.java | 10 ++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) 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