From c445d158d7f7ad95240076fafed5133e3878733d Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Thu, 16 Feb 2023 14:25:20 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-89926=20=E6=95=B0=E6=8D=AE=E8=84=B1?= =?UTF-8?q?=E6=95=8F=E4=B8=89=E6=9C=9F=E5=A2=9E=E5=8A=A0=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CellDesensitizationGroupsPane.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java index 1c4f200cba..de4e046b84 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/desensitization/CellDesensitizationGroupsPane.java @@ -121,7 +121,19 @@ public class CellDesensitizationGroupsPane extends JPanel { */ public void populate(List desensitizationBeans) { if (Objects.nonNull(desensitizationBeans)) { + // 记录埋点数据 + if (!desensitizationBeans.isEmpty()) { + recordDesensitization(desensitizationBeans); + } + editorPane.populate(desensitizationBeans.toArray(new CellDesensitizationBean[]{})); } } + + /** + * 记录预览导出脱敏埋点 + */ + private int recordDesensitization(List desensitizationBeans) { + return desensitizationBeans.size(); + } } From 9eb8c73c47eb24df3f59ca9c894befaf5d65f5d7 Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 16 Feb 2023 15:53:16 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E4=BE=9D=E8=B5=96=EF=BC=8C=E4=B8=8D=E5=BD=B1=E5=93=8D?= =?UTF-8?q?=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 671e64fb95..e0bf79aefe 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,5 @@ import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel +import org.gradle.internal.os.OperatingSystem plugins { id 'java' @@ -65,11 +66,7 @@ allprojects { implementation 'com.fr.cbb:fine-universal-skeleton:' + cbbVersion implementation 'com.install4j:install4j-runtime:8.0.4' implementation 'com.fr.third:jxbrowser:6.23' - implementation 'com.fr.third:jxbrowser-mac:6.23' - implementation 'com.fr.third:jxbrowser-win64:6.23' implementation 'com.fr.third:jxbrowser-v7:7.22' - implementation 'com.fr.third:jxbrowser-mac-v7:7.22' - implementation 'com.fr.third:jxbrowser-win64-v7:7.22' implementation 'com.fr.third:jxbrowser-swing-v7:7.22' implementation 'com.fr.third.server:servlet-api:3.0' implementation 'org.swingexplorer:swexpl:2.0.1' @@ -94,4 +91,16 @@ allprojects { testImplementation 'org.powermock:powermock-api-easymock:1.7.1' testImplementation 'junit:junit:4.12' } + + if (OperatingSystem.current().isMacOsX()) { + dependencies { + implementation 'com.fr.third:jxbrowser-mac:6.23' + implementation 'com.fr.third:jxbrowser-mac-v7:7.22' + } + } else if (OperatingSystem.current().isWindows()) { + dependencies { + implementation 'com.fr.third:jxbrowser-win64:6.23' + implementation 'com.fr.third:jxbrowser-win64-v7:7.22' + } + } } From 9eb4939bac4a6f276415158abcf53e8fd35f99c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvan-=E6=AC=A7=E9=98=B3=E5=B8=86?= Date: Thu, 16 Feb 2023 18:49:33 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-89957=20=E6=95=B0=E6=8D=AE=E8=84=B1?= =?UTF-8?q?=E6=95=8F-=E6=9C=AC=E5=9C=B0=E8=A7=84=E5=88=99=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BF=9D=E5=AD=98=20=E3=80=90=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E3=80=91=E8=BF=98=E6=98=AF=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E8=A7=84=E5=88=99=E8=BF=99=E8=BE=B9=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E6=9C=89=E5=A5=BD=E5=87=A0=E4=B8=AA=201.=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=A7=84=E5=88=99=E8=A7=A6=E5=8F=91=E7=9A=84updateRul?= =?UTF-8?q?e=E6=96=B9=E6=B3=95=EF=BC=8C=E5=8F=AA=E4=BC=A0=E5=85=A5?= =?UTF-8?q?=E4=BA=86=E4=BF=AE=E6=94=B9=E5=90=8E=E7=9A=84=E8=A7=84=E5=88=99?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=89=8D=E7=9A=84=E8=A7=84=E5=88=99?= =?UTF-8?q?=E6=9C=AA=E8=A2=AB=E7=A7=BB=E9=99=A4=202.=20=E8=A7=84=E5=88=99?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98=EF=BC=8CResourceIOUtils.tr?= =?UTF-8?q?yWrite=E6=8E=A5=E5=8F=A3=E5=9C=A8=E8=BF=9C=E7=A8=8B=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=8B=E6=9C=89=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BC=9A?= =?UTF-8?q?=E5=86=99=E5=88=B0=E6=9C=8D=E5=8A=A1=E5=99=A8=E4=B8=8A=E5=8E=BB?= =?UTF-8?q?=203.=20=E6=89=80=E6=9C=89=E8=A7=84=E5=88=99=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=A1=B5=E9=9D=A2=EF=BC=8C=E5=9B=A0=E4=B8=BA=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E6=94=B9=E5=8A=A8=E6=80=A7=E8=83=BD=EF=BC=8C=E5=B0=86?= =?UTF-8?q?=E8=A7=84=E5=88=99=E7=BC=93=E5=AD=98=E5=9C=A8=E4=BA=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=B8=AD=EF=BC=8C=E4=BD=86=E6=98=AF=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=BB=99=E5=88=B7=E6=96=B0=E7=BC=93=E5=AD=98=E7=9A=84=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=80=BB=E8=BE=91=EF=BC=8C=E5=AE=9E=E9=99=85=E4=B8=8A?= =?UTF-8?q?=E8=BF=99=E4=B8=AA=E8=A7=84=E5=88=99=E5=B1=95=E7=A4=BA=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E6=98=AF=E5=8F=AF=E4=BB=A5=E5=AF=B9=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E8=A7=84=E5=88=99=E5=81=9A=E7=BC=96=E8=BE=91=E7=AD=89?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E7=9A=84=EF=BC=8C=E6=98=AF=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E7=9A=84=20=E3=80=90=E6=94=B9=E5=8A=A8?= =?UTF-8?q?=E6=80=9D=E8=B7=AF=E3=80=91=201.=20updateRule=E5=81=9A=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84=E6=9B=B4=E6=96=B0=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A7=E8=A7=84=E5=88=99=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=96=B0=E8=A7=84=E5=88=99=202.=20ResourceIOUtils.try?= =?UTF-8?q?Write=E6=8D=A2=E6=88=90=E6=9C=AC=E5=9C=B0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=9A=84IO=E6=96=B9=E6=B3=95=203.=20?= =?UTF-8?q?=E6=AF=8F=E6=AC=A1=E6=89=93=E5=BC=80=E6=89=80=E6=9C=89=E8=A7=84?= =?UTF-8?q?=E5=88=99=E5=B1=95=E7=A4=BA=E7=9A=84=E9=A1=B5=E9=9D=A2=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=EF=BC=8C=E5=88=B7=E6=96=B0=E4=B8=80=E4=B8=8B=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E8=A7=84=E5=88=99=E7=BC=93=E5=AD=98=20=E3=80=90review?= =?UTF-8?q?=E5=BB=BA=E8=AE=AE=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/rule/DesensitizationRuleChoosePane.java | 13 ++++++++++--- .../setting/TableDataDesensitizationTableModel.java | 10 ++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java index 419299336e..11e30a2e9f 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/rule/DesensitizationRuleChoosePane.java @@ -275,18 +275,25 @@ public class DesensitizationRuleChoosePane extends JPanel { @Override public void actionPerformed(ActionEvent e) { - // 获取当前选中规则 - DesensitizationRule selectedValue = getSelectedValue(); + // 获取当前选中规则的副本 + DesensitizationRule selectedValue = null; + try { + selectedValue = (DesensitizationRule) getSelectedValue().clone(); + } catch (CloneNotSupportedException ex) { + throw new RuntimeException(ex); + } DesensitizationRuleEditPane editPane = new DesensitizationRuleEditPane(getCurrentExistRuleNames(selectedValue.getRuleName())); editPane.populateBean(selectedValue); + final DesensitizationRule finalRule = selectedValue; BasicDialog basicDialog = editPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(parent), new DialogActionAdapter() { @Override public void doOk() { DesensitizationRule rule = editPane.updateBean(); // 修改同步到RuleManager中 if (DesensitizationRule.valid(rule)) { - DesensitizationRuleManager.getInstance().updateRule(rule); + DesensitizationRuleManager.getInstance().updateRule(finalRule, rule); } + setSelectedValue(rule); fireTableDataChanged(); } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java index f050e4b0cd..52b7e5b19b 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/setting/TableDataDesensitizationTableModel.java @@ -250,6 +250,8 @@ public class TableDataDesensitizationTableModel extends UITableModelAdapter customRules = DesensitizationRuleManager.getInstance().getRulesBySource(DesensitizationRuleSource.CUSTOM); + latestRules.put(DesensitizationRuleSource.CUSTOM, customRules); + } + } From 9f38b4c2cbe53d72be219b8bea8036fccf6a6ba6 Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Fri, 17 Feb 2023 11:15:58 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-90013=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=8D=E6=94=AF=E6=8C=81=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=9E=E6=8E=A5=E7=B1=BB=E5=9E=8B=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=E3=80=91=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91=E5=86=99?= =?UTF-8?q?=E5=8F=8D=E4=BA=86=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D?= =?UTF-8?q?=E8=B7=AF=E3=80=91=E4=BF=AE=E6=94=B9=E5=88=A4=E8=AF=BB=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/connect/ConnectionManagerPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java index 2641452218..a9798d25c6 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java @@ -80,7 +80,7 @@ public class ConnectionManagerPane extends LoadingBasicPane implements Connectio // 仅校验jdbc连接,其他插件数据连接不进行校验 if (connection instanceof JDBCDatabaseConnection) { DatabaseResultBean bean = WorkContext.getCurrent().get(DataBaseTypeOperator.class).validateDatabaseType(connection.getDriver(), connection.feature()); - if (bean.equals(DatabaseResultBean.DefaultBean())) { + if (!bean.equals(DatabaseResultBean.DefaultBean())) { throw new DataBaseNotSupportedException(bean.getMsg()); } }