From ab3eb24b027472cbf67d8201d7a96dff2c7fb851 Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 24 Mar 2025 13:54:04 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=95=B0=E6=8D=AE=E9=9B=86):=20?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=AD=97=E6=AE=B5=E4=B8=AD=E7=9A=84=20SQL=20?= =?UTF-8?q?=E7=89=87=E6=AE=B5=E5=9C=A8=E4=BC=A0=E8=BE=93=E8=BF=87=E7=A8=8B?= =?UTF-8?q?=E4=B8=AD=E8=BF=9B=E8=A1=8C=E5=8A=A0=E5=AF=86=E5=A4=84=E7=90=86?= =?UTF-8?q?=20#15446?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/dataset/manage/DatasetGroupManage.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java index 7c88f4558b..0e3c2a21f4 100644 --- a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java +++ b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java @@ -90,9 +90,6 @@ public class DatasetGroupManage { public DatasetGroupInfoDTO save(DatasetGroupInfoDTO datasetGroupInfoDTO, boolean rename, boolean encode) throws Exception { lock.lock(); try { - if (encode) { - DatasetUtils.dsDecode(datasetGroupInfoDTO); - } boolean isCreate; // 用于重命名获取pid if (ObjectUtils.isEmpty(datasetGroupInfoDTO.getPid()) && ObjectUtils.isNotEmpty(datasetGroupInfoDTO.getId())) { @@ -133,6 +130,9 @@ public class DatasetGroupManage { } // node_type=dataset需要创建dataset_table和field if (StringUtils.equalsIgnoreCase(datasetGroupInfoDTO.getNodeType(), "dataset")) { + if (encode) { + DatasetUtils.dsDecode(datasetGroupInfoDTO); + } List tableIds = new ArrayList<>(); List fieldIds = new ArrayList<>(); // 解析tree,保存 @@ -141,9 +141,9 @@ public class DatasetGroupManage { // 删除不要的table和field datasetTableManage.deleteByDatasetGroupUpdate(datasetGroupInfoDTO.getId(), tableIds); datasetTableFieldManage.deleteByDatasetGroupUpdate(datasetGroupInfoDTO.getId(), fieldIds); - } - if (encode) { - DatasetUtils.dsEncode(datasetGroupInfoDTO); + if (encode) { + DatasetUtils.dsEncode(datasetGroupInfoDTO); + } } return datasetGroupInfoDTO; } catch (Exception e) {