From aa5d4cf0e29bac9d8739876adfa66da052686c0e Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 31 May 2022 23:15:16 +0800 Subject: [PATCH 1/8] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E5=8D=A1=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/widget/DeWidget/DeTabs.vue | 8 ++++++-- frontend/src/lang/en.js | 3 ++- frontend/src/lang/tw.js | 3 ++- frontend/src/lang/zh.js | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/widget/DeWidget/DeTabs.vue b/frontend/src/components/widget/DeWidget/DeTabs.vue index 3aef14dd72..4fff2799ea 100644 --- a/frontend/src/components/widget/DeWidget/DeTabs.vue +++ b/frontend/src/components/widget/DeWidget/DeTabs.vue @@ -333,13 +333,17 @@ export default { this.styleChange() } }) + this.otherComponentDialogVisible = false + return } - this.otherComponentDialogVisible = false + this.$warning(this.$t('detabs.please') + this.$t('detabs.selectOthers')) + }, sureViewSelector() { const nodes = this.$refs.viewSelect.getCurrentSelected() if (!nodes || nodes.length === 0) { - this.viewDialogVisible = false + this.$warning(this.$t('detabs.please') + this.$t('detabs.selectview')) + return } const node = nodes[0] diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 8e627521c0..9398ba7623 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -416,7 +416,8 @@ export default { eidttitle: 'Edit Title', selectview: 'Select View', selectOthers: 'Select Others', - availableComponents: 'Available Components' + availableComponents: 'Available Components', + please: 'Please' }, example: { warning: 'Creating and editing pages cannot be cached by keep-alive because keep-alive include does not currently support caching based on routes, so it is currently cached based on component name. If you want to achieve a similar caching effect, you can use a browser caching scheme such as localStorage. Or do not use keep-alive include to cache all pages directly. See details' diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index fd8c401e24..98289a8e2e 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -416,7 +416,8 @@ export default { eidttitle: '編輯標題', selectview: '選擇視圖', selectOthers: '選擇組件', - availableComponents: '可選組件' + availableComponents: '可選組件', + please: '未' }, example: { warning: '創建和編輯頁面是不能被 keep-alive 緩存的,因爲keep-alive 的 include 目前不支持根據路由來緩存,所以目前都是基於 component name 來進行緩存的。如果妳想類似的實現緩存效果,可以使用 localStorage 等瀏覽器緩存方案。或者不要使用 keep-alive 的 include,直接緩存所有頁面。詳情見' diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index cef09bc9d5..2d9678c76b 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -417,7 +417,8 @@ export default { eidttitle: '编辑标题', selectview: '选择视图', selectOthers: '选择组件', - availableComponents: '可选组件' + availableComponents: '可选组件', + please: '未' }, example: { warning: '创建和编辑页面是不能被 keep-alive 缓存的,因为keep-alive 的 include 目前不支持根据路由来缓存,所以目前都是基于 component name 来进行缓存的。如果你想类似的实现缓存效果,可以使用 localStorage 等浏览器缓存方案。或者不要使用 keep-alive 的 include,直接缓存所有页面。详情见' From 29024d4dd4ea4f3a31c381216c17f2686d7acec5 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 1 Jun 2022 17:19:51 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix:=20=E8=BF=87=E6=BB=A4=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=AD=E8=81=94=E5=8A=A8=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E9=83=A8=E5=88=86=E6=95=B0=E5=AD=97=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E6=9C=AA=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/components/Editor/LinkageField.vue | 4 ++-- frontend/src/views/panel/LinkJumpSet/index.vue | 2 +- frontend/src/views/panel/OuterParamsSet/index.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/LinkageField.vue b/frontend/src/components/canvas/components/Editor/LinkageField.vue index 7217837f80..843475f2f3 100644 --- a/frontend/src/components/canvas/components/Editor/LinkageField.vue +++ b/frontend/src/components/canvas/components/Editor/LinkageField.vue @@ -28,7 +28,7 @@ - + {{ item.name }} @@ -48,7 +48,7 @@ - + {{ item.name }} diff --git a/frontend/src/views/panel/LinkJumpSet/index.vue b/frontend/src/views/panel/LinkJumpSet/index.vue index 22a1966c7c..66aaad1b9d 100644 --- a/frontend/src/views/panel/LinkJumpSet/index.vue +++ b/frontend/src/views/panel/LinkJumpSet/index.vue @@ -118,7 +118,7 @@ - + {{ viewField.name }} diff --git a/frontend/src/views/panel/OuterParamsSet/index.vue b/frontend/src/views/panel/OuterParamsSet/index.vue index a72b716d8d..a283df03f1 100644 --- a/frontend/src/views/panel/OuterParamsSet/index.vue +++ b/frontend/src/views/panel/OuterParamsSet/index.vue @@ -110,7 +110,7 @@ From 4ee6d8625126830b955cea27cce0473e22a55e6d Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 1 Jun 2022 18:56:02 +0800 Subject: [PATCH 3/8] =?UTF-8?q?fix:=20=E6=8F=92=E4=BB=B6=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=B8=A6scheme=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E6=B2=A1=E6=9C=89=E8=AE=BE=E7=BD=AEscheme=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=9F=A5=E8=AF=A2=E4=B8=8D=E5=88=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/commons/model/PluginViewSetImpl.java | 11 +++++++++++ .../dataease/service/chart/ChartViewService.java | 4 +++- .../service/chart/ViewPluginBaseServiceImpl.java | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 backend/src/main/java/io/dataease/commons/model/PluginViewSetImpl.java diff --git a/backend/src/main/java/io/dataease/commons/model/PluginViewSetImpl.java b/backend/src/main/java/io/dataease/commons/model/PluginViewSetImpl.java new file mode 100644 index 0000000000..125c772261 --- /dev/null +++ b/backend/src/main/java/io/dataease/commons/model/PluginViewSetImpl.java @@ -0,0 +1,11 @@ +package io.dataease.commons.model; + +import io.dataease.plugins.common.base.domain.Datasource; +import io.dataease.plugins.view.entity.PluginViewSet; +import lombok.Data; + +@Data +public class PluginViewSetImpl extends PluginViewSet { + + private Datasource ds; +} diff --git a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java index d5d2bb2e6b..16f2bcfb12 100644 --- a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java +++ b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java @@ -5,6 +5,7 @@ import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import io.dataease.auth.entity.SysUserEntity; import io.dataease.auth.service.AuthUserService; +import io.dataease.commons.model.PluginViewSetImpl; import io.dataease.ext.*; import io.dataease.commons.constants.CommonConstants; import io.dataease.commons.constants.JdbcConstants; @@ -1094,9 +1095,10 @@ public class ChartViewService { private PluginViewParam buildPluginParam(Map> fieldMap, List customFilters, List extFilters, Datasource ds, DatasetTable table, ChartViewDTO view) { PluginViewParam pluginViewParam = new PluginViewParam(); - PluginViewSet pluginViewSet = BeanUtils.copyBean(new PluginViewSet(), table); + PluginViewSetImpl pluginViewSet = BeanUtils.copyBean(new PluginViewSetImpl(), table); pluginViewSet.setDsType(ds.getType()); pluginViewSet.setTabelId(table.getId()); + pluginViewSet.setDs(ds); PluginViewLimit pluginViewLimit = BeanUtils.copyBean(new PluginViewLimit(), view); diff --git a/backend/src/main/java/io/dataease/service/chart/ViewPluginBaseServiceImpl.java b/backend/src/main/java/io/dataease/service/chart/ViewPluginBaseServiceImpl.java index eac7c169c0..7b331b7ca6 100644 --- a/backend/src/main/java/io/dataease/service/chart/ViewPluginBaseServiceImpl.java +++ b/backend/src/main/java/io/dataease/service/chart/ViewPluginBaseServiceImpl.java @@ -2,6 +2,7 @@ package io.dataease.service.chart; import cn.hutool.core.util.ReflectUtil; import com.google.gson.Gson; +import io.dataease.commons.model.PluginViewSetImpl; import io.dataease.dto.dataset.DataSetTableUnionDTO; import io.dataease.dto.dataset.DataTableInfoDTO; import io.dataease.plugins.common.base.domain.ChartViewWithBLOBs; @@ -128,6 +129,19 @@ public class ViewPluginBaseServiceImpl implements ViewPluginBaseService { String tabelName = (tableName.startsWith("(") && tableName.endsWith(")")) ? tableName : String.format(keyword, tableName); String tabelAlias = String.format(TABLE_ALIAS_PREFIX, 0); PluginViewSQL tableObj = PluginViewSQL.builder().tableName(tabelName).tableAlias(tabelAlias).build(); + + + QueryProvider queryProvider = ProviderFactory.getQueryProvider(pluginViewSet.getDsType()); + + SQLObj sqlObj = SQLObj.builder().tableName(tabelName).tableAlias(tabelAlias).build(); + PluginViewSetImpl child = (PluginViewSetImpl)pluginViewSet; + queryProvider.setSchema(sqlObj, child.getDs()); + // String methodName = "setSchema"; + // execProviderMethod(queryProvider, methodName, sqlObj, child.getDs()); + tableObj.setTableName(sqlObj.getTableName()); + tableObj.setTableAlias(sqlObj.getTableAlias()); + + return tableObj; } From e04dea30a4e1290d5b7e819afaa5565ad19b1ecb Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 31 May 2022 23:15:16 +0800 Subject: [PATCH 4/8] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E5=8D=A1=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/widget/DeWidget/DeTabs.vue | 8 ++++++-- frontend/src/lang/en.js | 3 ++- frontend/src/lang/tw.js | 3 ++- frontend/src/lang/zh.js | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/widget/DeWidget/DeTabs.vue b/frontend/src/components/widget/DeWidget/DeTabs.vue index 3aef14dd72..4fff2799ea 100644 --- a/frontend/src/components/widget/DeWidget/DeTabs.vue +++ b/frontend/src/components/widget/DeWidget/DeTabs.vue @@ -333,13 +333,17 @@ export default { this.styleChange() } }) + this.otherComponentDialogVisible = false + return } - this.otherComponentDialogVisible = false + this.$warning(this.$t('detabs.please') + this.$t('detabs.selectOthers')) + }, sureViewSelector() { const nodes = this.$refs.viewSelect.getCurrentSelected() if (!nodes || nodes.length === 0) { - this.viewDialogVisible = false + this.$warning(this.$t('detabs.please') + this.$t('detabs.selectview')) + return } const node = nodes[0] diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 8e627521c0..9398ba7623 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -416,7 +416,8 @@ export default { eidttitle: 'Edit Title', selectview: 'Select View', selectOthers: 'Select Others', - availableComponents: 'Available Components' + availableComponents: 'Available Components', + please: 'Please' }, example: { warning: 'Creating and editing pages cannot be cached by keep-alive because keep-alive include does not currently support caching based on routes, so it is currently cached based on component name. If you want to achieve a similar caching effect, you can use a browser caching scheme such as localStorage. Or do not use keep-alive include to cache all pages directly. See details' diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index fd8c401e24..98289a8e2e 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -416,7 +416,8 @@ export default { eidttitle: '編輯標題', selectview: '選擇視圖', selectOthers: '選擇組件', - availableComponents: '可選組件' + availableComponents: '可選組件', + please: '未' }, example: { warning: '創建和編輯頁面是不能被 keep-alive 緩存的,因爲keep-alive 的 include 目前不支持根據路由來緩存,所以目前都是基於 component name 來進行緩存的。如果妳想類似的實現緩存效果,可以使用 localStorage 等瀏覽器緩存方案。或者不要使用 keep-alive 的 include,直接緩存所有頁面。詳情見' diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index cef09bc9d5..2d9678c76b 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -417,7 +417,8 @@ export default { eidttitle: '编辑标题', selectview: '选择视图', selectOthers: '选择组件', - availableComponents: '可选组件' + availableComponents: '可选组件', + please: '未' }, example: { warning: '创建和编辑页面是不能被 keep-alive 缓存的,因为keep-alive 的 include 目前不支持根据路由来缓存,所以目前都是基于 component name 来进行缓存的。如果你想类似的实现缓存效果,可以使用 localStorage 等浏览器缓存方案。或者不要使用 keep-alive 的 include,直接缓存所有页面。详情见' From abb50739714885bc7859c08c08366f3812cc75dd Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 2 Jun 2022 13:30:30 +0800 Subject: [PATCH 5/8] =?UTF-8?q?fix:=20=E5=8D=87=E7=BA=A7=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B71.11.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pom.xml | 8 ++++---- frontend/package.json | 2 +- frontend/pom.xml | 2 +- mobile/package.json | 2 +- mobile/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/pom.xml b/backend/pom.xml index d3c3b8c156..2049f49faf 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -5,7 +5,7 @@ dataease-server io.dataease - 1.11.0 + 1.11.1 4.0.0 @@ -241,17 +241,17 @@ io.dataease dataease-plugin-interface - 1.11.0 + 1.11.1 io.dataease dataease-plugin-view - 1.11.0 + 1.11.1 io.dataease dataease-plugin-datasource - 1.11.0 + 1.11.1 diff --git a/frontend/package.json b/frontend/package.json index 5d4f072e69..3d86709b2b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "dataease", - "version": "1.11.0", + "version": "1.11.1", "description": "dataease front", "private": true, "scripts": { diff --git a/frontend/pom.xml b/frontend/pom.xml index 137b5b4943..2f0f4294a0 100644 --- a/frontend/pom.xml +++ b/frontend/pom.xml @@ -6,7 +6,7 @@ dataease-server io.dataease - 1.11.0 + 1.11.1 4.0.0 diff --git a/mobile/package.json b/mobile/package.json index d22d55817a..339ec78af2 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -1,6 +1,6 @@ { "name": "dataease-mobile", - "version": "0.1.0", + "version": "1.11.1", "private": true, "scripts": { "serve": "npm run dev:h5", diff --git a/mobile/pom.xml b/mobile/pom.xml index 08d09d4aa7..a1753f6557 100644 --- a/mobile/pom.xml +++ b/mobile/pom.xml @@ -6,7 +6,7 @@ dataease-server io.dataease - 1.11.0 + 1.11.1 4.0.0 diff --git a/pom.xml b/pom.xml index f95a0d87c0..495dd8cf5d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 io.dataease dataease-server - 1.11.0 + 1.11.1 pom From 3d8aee71dfbf1f38df62eaeb1666d1a2978e677f Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 2 Jun 2022 15:36:49 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix:=20=E6=81=A2=E5=A4=8D=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/util.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/frontend/src/views/chart/chart/util.js b/frontend/src/views/chart/chart/util.js index c100ca2f23..a18542587e 100644 --- a/frontend/src/views/chart/chart/util.js +++ b/frontend/src/views/chart/chart/util.js @@ -61,6 +61,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ] @@ -101,6 +102,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ] @@ -144,6 +146,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ] @@ -176,6 +179,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ] @@ -208,6 +212,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ] @@ -246,6 +251,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ] @@ -352,6 +358,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -426,6 +433,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -500,6 +508,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -573,6 +582,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -639,6 +649,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ] @@ -705,6 +716,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -778,6 +790,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -830,6 +843,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -882,6 +896,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -935,6 +950,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -985,6 +1001,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -1022,6 +1039,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ] @@ -1088,6 +1106,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], @@ -1135,6 +1154,7 @@ export const TYPE_CONFIGS = [ 'title', 'fontSize', 'color', + 'hPosition', 'isItalic', 'isBolder' ], From 3a1e4db6e0158e7aa1eaa6c1b9ba223ac2179b46 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 2 Jun 2022 17:30:50 +0800 Subject: [PATCH 7/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=E4=B8=8D=E8=83=BD=E5=88=9B=E5=BB=BA=E6=9C=80=E9=A1=B6?= =?UTF-8?q?=E5=B1=82=E7=9B=AE=E5=BD=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/list/EditPanel/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/panel/list/EditPanel/index.vue b/frontend/src/views/panel/list/EditPanel/index.vue index a78ef75ff1..0645aaafd1 100644 --- a/frontend/src/views/panel/list/EditPanel/index.vue +++ b/frontend/src/views/panel/list/EditPanel/index.vue @@ -147,7 +147,7 @@ export default { } this.editPanel.panelInfo['newFrom'] = this.inputType this.loading = true - if (this.editPanel.optType === 'new') { + if (this.editPanel.optType === 'new' || this.editPanel.optType === 'newFirstFolder') { panelSave(this.editPanel.panelInfo).then(response => { this.$message({ message: this.$t('commons.save_success'), From 6bee78446fd15e39c8e99913009dc4fa75ee6b8e Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 2 Jun 2022 18:25:10 +0800 Subject: [PATCH 8/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=85=B3=E8=81=94=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/dataset/DataSetTableService.java | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java index 52972307a8..a36fa85640 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -1,6 +1,7 @@ package io.dataease.service.dataset; import com.google.gson.Gson; +import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import io.dataease.auth.annotation.DeCleaner; @@ -585,9 +586,9 @@ public class DataSetTableService { } else { // check doris table if (!checkEngineTableIsExists(dataSetTableRequest.getId())) { - if(dataSetTableRequest.isPreviewForTask()){ + if (dataSetTableRequest.isPreviewForTask()) { return map; - }else { + } else { throw new RuntimeException(Translator.get("i18n_data_not_sync")); } } @@ -1346,7 +1347,11 @@ public class DataSetTableService { String configuration = ds.getConfiguration(); JsonObject jsonObject = JsonParser.parseString(configuration).getAsJsonObject(); - String schema = jsonObject.get("schema").getAsString(); + JsonElement schemaJson = jsonObject.get("schema"); + String schema = null; + if (schemaJson != null) { + schema = schemaJson.getAsString(); + } String joinPrefix = ""; if (StringUtils.isNotEmpty(schema) && (StringUtils.equalsIgnoreCase(ds.getType(), DatasourceTypes.db2.getType()) || StringUtils.equalsIgnoreCase(ds.getType(), DatasourceTypes.sqlServer.getType()) || @@ -1907,7 +1912,7 @@ public class DataSetTableService { List oldFields = datasetTableFields.stream().map(DatasetTableField::getOriginName).collect(Collectors.toList()); - if(editType == 1){ + if (editType == 1) { for (ExcelSheetData excelSheetData : excelSheetDataList) { List tableFields = excelSheetData.getFields(); List newFields = tableFields.stream().map(TableField::getRemarks).collect(Collectors.toList()); @@ -1918,7 +1923,7 @@ public class DataSetTableService { if (retrunSheetDataList.size() == 0) { DataEaseException.throwException(Translator.get("i18n_excel_column_change")); } - }else { + } else { List extFields = fields.stream().filter(datasetTableField -> datasetTableField.getExtField() > 0).collect(Collectors.toList()); List extFieldsRefIds = new ArrayList<>(); for (DatasetTableField extField : extFields) { @@ -1928,7 +1933,7 @@ public class DataSetTableService { Matcher matcher = pattern.matcher(originField); while (matcher.find()) { String id = matcher.group(1); - if(!extFieldsRefIds.contains(id)){ + if (!extFieldsRefIds.contains(id)) { extFieldsRefIds.add(id); } } @@ -1939,12 +1944,12 @@ public class DataSetTableService { List newFields = tableFields.stream().map(TableField::getRemarks).collect(Collectors.toList()); if (oldFields.equals(newFields)) { excelSheetData.setChangeFiled(false); - }else { + } else { excelSheetData.setChangeFiled(true); } boolean effectExtField = false; for (String extFieldsRefName : extFieldsRefNames) { - if(!newFields.contains(extFieldsRefName)){ + if (!newFields.contains(extFieldsRefName)) { effectExtField = true; } } @@ -1956,7 +1961,7 @@ public class DataSetTableService { DataEaseException.throwException(Translator.get("i18n_excel_column_change")); } } - }else { + } else { retrunSheetDataList = excelSheetDataList; } retrunSheetDataList = retrunSheetDataList.stream() @@ -2374,7 +2379,7 @@ public class DataSetTableService { return datasetTable; } - public int updateByExampleSelective(DatasetTable record, DatasetTableExample example ){ + public int updateByExampleSelective(DatasetTable record, DatasetTableExample example) { return datasetTableMapper.updateByExampleSelective(record, example); } }