From ded252677c17a52c06211759e22d73c180a942e8 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 24 Aug 2021 11:42:27 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-57496=20FR11=E4=B8=80=E8=BD=AE=E5=9B=9E?= =?UTF-8?q?=E5=BD=92-=E8=BF=9C=E7=A8=8B=E8=AE=BE=E8=AE=A1-=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=95=B0=E6=8D=AE=E9=9B=86=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledatapane/DBTableDataPane.java | 2 +- .../db/DBTableDataSavedHook.java | 47 ------------------- 2 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/db/DBTableDataSavedHook.java diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 8b8099ab46..453e4bc946 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -19,7 +19,6 @@ import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.design.data.datapane.preview.sql.PreviewPerformedSqlPane; import com.fr.design.data.datapane.sqlpane.SQLEditPane; import com.fr.design.data.tabledata.strategy.StrategyConfigHandler; -import com.fr.design.data.tabledata.tabledatapane.db.DBTableDataSavedHook; import com.fr.design.data.tabledata.tabledatapane.db.StrategyConfigFrom; import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicPane; @@ -45,6 +44,7 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.esd.core.strategy.config.StrategyConfig; import com.fr.esd.core.strategy.config.StrategyConfigHelper; import com.fr.esd.core.strategy.config.service.StrategyConfigService; +import com.fr.esd.data.db.DBTableDataSavedHook; import com.fr.esd.event.DSMapping; import com.fr.esd.event.DsNameTarget; import com.fr.esd.event.StrategyEventsNotifier; diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/db/DBTableDataSavedHook.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/db/DBTableDataSavedHook.java deleted file mode 100644 index 8d9a51249d..0000000000 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/db/DBTableDataSavedHook.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.fr.design.data.tabledata.tabledatapane.db; - -import com.fr.data.impl.DBTableData; -import com.fr.esd.event.DSMapping; -import com.fr.esd.event.DsNameTarget; -import com.fr.esd.event.StrategyEventsNotifier; -import com.fr.esd.event.xml.XMLSavedHook; -import com.fr.stable.StringUtils; - -public class DBTableDataSavedHook implements XMLSavedHook { - - private static final long serialVersionUID = 4925391747683335372L; - - private final String tplPath; - private String origName; - - private String origConnection; - - private String origQuery; - - public DBTableDataSavedHook(String tplPath, DBTableData origDBTableData) { - this.tplPath = tplPath; - this.origName = origDBTableData.getDsName(); - this.origConnection = origDBTableData.getDatabase().toString(); - this.origQuery = origDBTableData.getQuery(); - } - - @Override - public void doAfterSaved(DBTableData saved) { - String dsName = saved.getDsName(); - String conn = saved.getDatabase().toString(); - String query = saved.getQuery(); - - - //检查数据集名称、数据链接和sql是否修改,如果修改需要触发缓存监听事件 - if (!dsName.equals(origName) || !conn.equals(origConnection) || !query.equals(origQuery)) { - if (StringUtils.isNotEmpty(tplPath) && StringUtils.isNotEmpty(origName)) { - //新建数据集的origName为null,不用触发 - StrategyEventsNotifier.modifyDataSet(new DSMapping(tplPath, new DsNameTarget(origName))); - } - } - - this.origName = dsName; - this.origConnection = conn; - this.origQuery = query; - } -} \ No newline at end of file