From e243798f3c2cc2dba1c261877fda32aa391def93 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 25 Dec 2023 11:19:55 +0800 Subject: [PATCH 01/13] =?UTF-8?q?perf:=20=E5=AD=97=E4=BD=93=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=99=BD=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java b/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java index 41ac7d5aba..c6b86a7ca3 100644 --- a/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java +++ b/sdk/common/src/main/java/io/dataease/utils/WhitelistUtils.java @@ -27,7 +27,7 @@ public class WhitelistUtils { requestURI = requestURI.replaceFirst(AuthConstant.DE_API_PREFIX, ""); } return WHITE_PATH.contains(requestURI) - || StringUtils.endsWithAny(requestURI, ".ico", "js", ".css", "svg", "png", "jpg", "js.map") + || StringUtils.endsWithAny(requestURI, ".ico", "js", ".css", "svg", "png", "jpg", "js.map", ".otf") || StringUtils.startsWithAny(requestURI, "data:image") || StringUtils.startsWithAny(requestURI, "/login/platformLogin/") || StringUtils.startsWithAny(requestURI, "/static-resource/") From a09b45e093e79111cfe5577678ba6fbee05139e7 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 25 Dec 2023 11:42:47 +0800 Subject: [PATCH 02/13] =?UTF-8?q?style:=20=E4=BF=AE=E6=94=B9=E6=A8=A1?= =?UTF-8?q?=E7=89=88=E7=AE=A1=E7=90=86=E6=B7=BB=E5=8A=A0=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/template/component/DeTemplateImport.vue | 8 ++++---- core/core-frontend/src/views/template/index.vue | 12 ++++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/core/core-frontend/src/views/template/component/DeTemplateImport.vue b/core/core-frontend/src/views/template/component/DeTemplateImport.vue index ed4eab0f8b..e5360331a5 100644 --- a/core/core-frontend/src/views/template/component/DeTemplateImport.vue +++ b/core/core-frontend/src/views/template/component/DeTemplateImport.vue @@ -172,7 +172,7 @@ const editTemplate = () => { nameCheck(nameCheckRequest).then(response => { save(state.templateInfo).then(response => { ElMessage.success(t('编辑成功')) - emits('refresh') + emits('refresh', { optType: 'refresh' }) emits('closeEditTemplateDialog') }) }) @@ -196,7 +196,7 @@ const importTemplate = () => { }).then(() => { save(state.templateInfo).then(response => { ElMessage.success(t('覆盖成功')) - emits('refresh') + emits('refresh', { optType: 'refresh' }) emits('closeEditTemplateDialog') }) }) @@ -205,7 +205,7 @@ const importTemplate = () => { nameCheck(nameCheckRequest).then(response => { save(state.templateInfo).then(response => { ElMessage.success(t('导入成功')) - emits('refresh') + emits('refresh', { optType: 'refresh' }) emits('closeEditTemplateDialog') }) }) @@ -235,7 +235,7 @@ const goFile = () => { } const doAddCategory = () => { - emits('addCategoryInfo') + emits('refresh', { optType: 'addCategory' }) } onMounted(() => { diff --git a/core/core-frontend/src/views/template/index.vue b/core/core-frontend/src/views/template/index.vue index 0f80fab9fa..46a7d36284 100644 --- a/core/core-frontend/src/views/template/index.vue +++ b/core/core-frontend/src/views/template/index.vue @@ -123,7 +123,7 @@ :template-id="state.templateDialog.templateId" :opt-type="state.templateDialog.optType" :template-categories="state.templateCategories" - @addCategoryInfo="showTemplateEditDialog('new', null)" + @doTest="closeEditTemplateDialog" @refresh="showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel)" @closeEditTemplateDialog="closeEditTemplateDialog" /> @@ -144,7 +144,7 @@ :template-id="state.templateDialog.templateId" :opt-type="state.templateDialog.optType" :template-categories="state.templateCategories" - @refresh="showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel)" + @refresh="importRefresh" @closeEditTemplateDialog="closeEditTemplateDialog" /> @@ -351,6 +351,14 @@ const handleClick = (tab, event) => { getTree() } +const importRefresh = params => { + if (params.optType === 'refresh') { + showCurrentTemplate(state.currentTemplateId, state.currentTemplateLabel) + } else { + showTemplateEditDialog('new', null) + } +} + const showCurrentTemplate = (pid, label) => { state.currentTemplateId = pid state.currentTemplateLabel = label From c708761a4a1d2d9cf1e986203eb73714617925f9 Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 25 Dec 2023 17:17:42 +0800 Subject: [PATCH 03/13] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E7=BB=84=E4=BB=B6=E8=BF=87=E6=BB=A4=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=88=B3=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20#7313?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/engine/trans/ExtWhere2Str.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java index a05deff48d..aa27f299f5 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java +++ b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java @@ -65,8 +65,6 @@ public class ExtWhere2Str { } if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { String cast = String.format(SQLConstants.CAST, originName, SQLConstants.DEFAULT_INT_FORMAT); - // 此处获取标准格式的日期 - whereName = String.format(SQLConstants.FROM_UNIXTIME, cast, date_format); } if (field.getDeExtractType() == 1) { // 此处获取标准格式的日期 From d652d48241cfdb59039f636902686e02a358c7ca Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 25 Dec 2023 17:41:07 +0800 Subject: [PATCH 04/13] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E7=BB=84=E4=BB=B6=E8=BF=87=E6=BB=A4=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=88=B3=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20#7313?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/engine/trans/ExtWhere2Str.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java index aa27f299f5..52ebf29b35 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java +++ b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java @@ -64,7 +64,7 @@ public class ExtWhere2Str { whereName = String.format(SQLConstants.DE_CAST_DATE_FORMAT, originName, StringUtils.isEmpty(field.getDateFormat()) ? SQLConstants.DEFAULT_DATE_FORMAT : field.getDateFormat(), date_format); } if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { - String cast = String.format(SQLConstants.CAST, originName, SQLConstants.DEFAULT_INT_FORMAT); + whereName = String.format(SQLConstants.CAST, originName, SQLConstants.DEFAULT_INT_FORMAT); } if (field.getDeExtractType() == 1) { // 此处获取标准格式的日期 From b958aacf6c1dcf1f97b9c3e2e06ba3a525b919f0 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 25 Dec 2023 18:49:43 +0800 Subject: [PATCH 05/13] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AF=E9=9D=99?= =?UTF-8?q?=E6=80=81=E8=B5=84=E6=BA=90=E5=A2=9E=E5=8A=A0=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/config/common.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/core-frontend/config/common.ts b/core/core-frontend/config/common.ts index 58479abfdc..4ecb03664d 100644 --- a/core/core-frontend/config/common.ts +++ b/core/core-frontend/config/common.ts @@ -21,6 +21,7 @@ export function pathResolve(dir: string) { return resolve(root, '.', dir) } export default { + base: '/dev2-front', plugins: [ Vue(), VueJsx(), From 614e0fc0a5051d632b2da694fcfdb3904ad41ee3 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 25 Dec 2023 18:51:13 +0800 Subject: [PATCH 06/13] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AF=E9=9D=99?= =?UTF-8?q?=E6=80=81=E8=B5=84=E6=BA=90=E5=A2=9E=E5=8A=A0=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E5=89=8D=E7=BC=80=E9=80=82=E9=85=8D=E6=89=93=E5=8C=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-backend/pom.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/core-backend/pom.xml b/core/core-backend/pom.xml index ad0152efa1..31513ebd35 100644 --- a/core/core-backend/pom.xml +++ b/core/core-backend/pom.xml @@ -124,10 +124,15 @@ generate-resources - + + + + + + From fd21624d20cb20de01d3b06afcf431008f0a4716 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 25 Dec 2023 19:59:07 +0800 Subject: [PATCH 07/13] =?UTF-8?q?style:=20=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/assets/svg/dv-nothing.svg | 14 ++ .../src/views/template/index.vue | 235 +++++++++++------- 2 files changed, 158 insertions(+), 91 deletions(-) create mode 100644 core/core-frontend/src/assets/svg/dv-nothing.svg diff --git a/core/core-frontend/src/assets/svg/dv-nothing.svg b/core/core-frontend/src/assets/svg/dv-nothing.svg new file mode 100644 index 0000000000..45830feb86 --- /dev/null +++ b/core/core-frontend/src/assets/svg/dv-nothing.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/core/core-frontend/src/views/template/index.vue b/core/core-frontend/src/views/template/index.vue index 46a7d36284..ed64f808c9 100644 --- a/core/core-frontend/src/views/template/index.vue +++ b/core/core-frontend/src/views/template/index.vue @@ -24,7 +24,7 @@
-
+
@@ -52,11 +52,24 @@ 的搜索结果 {{ currentTemplateShowListComputed.length }} 个
- + + + 暂无模版 + + + + + 没有找到相关模版 + +
- - - - - - - - - - - - - - - - - - - - - -
+
+ + + + + {{ t('visualization.import') }} + + + 添加分类 + + + +
+ + + + + + + + + + + + + + + + + + + + + +
@@ -188,6 +221,7 @@ import DeTemplateList from '@/views/template/component/DeTemplateList.vue' const { t } = useI18n() const templateEditFormRef = ref(null) const templateListRef = ref(null) +import NoneTemplate from '@/assets/svg/dv-empty.svg' import NoneImage from '@/assets/none.png' import DeTemplateImport from '@/views/template/component/DeTemplateImport.vue' import DeTemplateItem from '@/views/template/component/DeTemplateItem.vue' @@ -620,4 +654,23 @@ onMounted(() => { float: right; width: 320px; } + +.custom-position { + overflow: hidden; + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + flex-flow: row nowrap; + color: #9ea6b2; + flex-direction: column; + span { + line-height: 22px; + color: #646a73; + } +} + +.ed-empty__image img { + width: 126px; +} From 21069a148fab38ff10995fcc7ec32fde597d29b6 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 25 Dec 2023 20:23:14 +0800 Subject: [PATCH 08/13] =?UTF-8?q?refactor:=20=E5=A4=A7=E5=B1=8F=E5=88=86?= =?UTF-8?q?=E7=BB=84=E9=94=81=E5=AE=9A=E6=97=B6,=E5=86=85=E9=83=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=90=8C=E6=AD=A5=E9=94=81=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/store/modules/data-visualization/lock.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/core-frontend/src/store/modules/data-visualization/lock.ts b/core/core-frontend/src/store/modules/data-visualization/lock.ts index 59aa854f7d..4ab0b44014 100644 --- a/core/core-frontend/src/store/modules/data-visualization/lock.ts +++ b/core/core-frontend/src/store/modules/data-visualization/lock.ts @@ -9,10 +9,20 @@ export const lockStore = defineStore('lock', { actions: { lock() { curComponent.value.isLock = true + if (curComponent.value.component === 'Group') { + curComponent.value.propValue.forEach(component => { + component.isLock = true + }) + } }, unlock() { curComponent.value.isLock = false + if (curComponent.value.component === 'Group') { + curComponent.value.propValue.forEach(component => { + component.isLock = false + }) + } } } }) From 6865bebaff664f6a3e2e829c990a43f75e024501 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 25 Dec 2023 20:29:58 +0800 Subject: [PATCH 09/13] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E6=96=87?= =?UTF-8?q?=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-backend/src/main/resources/i18n/core_zh_CN.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-backend/src/main/resources/i18n/core_zh_CN.properties b/core/core-backend/src/main/resources/i18n/core_zh_CN.properties index af0608789c..d178774eb9 100644 --- a/core/core-backend/src/main/resources/i18n/core_zh_CN.properties +++ b/core/core-backend/src/main/resources/i18n/core_zh_CN.properties @@ -8,7 +8,7 @@ i18n_menu.template=\u6A21\u7248 i18n_menu.application=\u5E94\u7528 i18n_menu.system=\u7CFB\u7EDF\u7BA1\u7406 i18n_menu.template-market=\u6A21\u7248\u5E02\u573A -i18n_menu.template-setting=\u6A21\u7248\u7BA1\u7406 +i18n_menu.template-setting=\u6a21\u677f\u7ba1\u7406 i18n_menu.view=\u6570\u636E\u5C55\u793A i18n_menu.data=\u6570\u636E\u51C6\u5907 i18n_menu.panel=\u4EEA\u8868\u677F From 92afdd0c64201e124b5885d8a18c5f00fe66a998 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 25 Dec 2023 20:39:08 +0800 Subject: [PATCH 10/13] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E6=9D=BF=E5=A4=A7=E5=B1=8F=E8=B5=84=E6=BA=90=E6=A0=91?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=89=93=E5=BC=80=E7=AA=97=E5=8F=A3=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/views/common/DeResourceTree.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/common/DeResourceTree.vue b/core/core-frontend/src/views/common/DeResourceTree.vue index a5cad77784..8bea45f4d0 100644 --- a/core/core-frontend/src/views/common/DeResourceTree.vue +++ b/core/core-frontend/src/views/common/DeResourceTree.vue @@ -232,7 +232,7 @@ const operation = (cmd: string, data: BusiTreeNode, nodeType: string) => { }) } else if (cmd === 'edit') { resourceEdit(data.id) - } else { + } else if (cmd === 'copy') { const targetPid = findParentIdByChildIdRecursive(state.resourceTree, data.id) const params: ResourceOrFolder = { nodeType: nodeType as 'folder' | 'leaf', @@ -248,6 +248,8 @@ const operation = (cmd: string, data: BusiTreeNode, nodeType: string) => { : `#/dashboard?opt=copy&pid=${params.pid}&resourceId=${data.data}` window.open(baseUrl, '_blank') }) + } else { + resourceGroupOpt.value.optInit(nodeType, data, cmd, ['copy'].includes(cmd)) } } From 32eea248c36d50c886038a9a80d2c8b59265bc51 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 25 Dec 2023 21:37:07 +0800 Subject: [PATCH 11/13] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=A4=A7=E5=B1=8F=E7=BB=84=E5=90=88=E5=86=85=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E7=BC=96=E8=BE=91=E6=97=B6=E6=9C=AA=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/data-visualization/canvas/CanvasCore.vue | 6 +++++- core/core-frontend/src/custom-component/group/Component.vue | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue index 7e5cb6c784..4af2b06de1 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -205,6 +205,10 @@ const curScale = computed(() => { return canvasStyleData.value.scale / 100 }) +const curBaseScale = computed(() => { + return dvMainStore.canvasStyleData.scale / 100 +}) + const pointShadowShow = computed(() => { return ( canvasId.value === 'canvas-main' && @@ -1314,7 +1318,7 @@ defineExpose({ :id="'component' + item.id" :active="item.id === curComponentId" :dv-type="dvInfo.type" - :scale="curScale" + :scale="curBaseScale" :style="getComponentStyle(item.style)" :prop-value="item.propValue" :is-edit="true" diff --git a/core/core-frontend/src/custom-component/group/Component.vue b/core/core-frontend/src/custom-component/group/Component.vue index aceef1095b..52429009e0 100644 --- a/core/core-frontend/src/custom-component/group/Component.vue +++ b/core/core-frontend/src/custom-component/group/Component.vue @@ -55,9 +55,6 @@ const customCanvasStyle = computed(() => { result.scale = canvasStyleData.value.scale result.width = (element.value.style.width * 100) / result.scale result.height = (element.value.style.height * 100) / result.scale - - // result.width = element.value.style.width - // result.height = element.value.style.height return result }) From 6e23a564cbcbc04007301244e682dd34da1e1384 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 25 Dec 2023 21:52:25 +0800 Subject: [PATCH 12/13] =?UTF-8?q?refactor:=20=E5=A4=A7=E5=B1=8F=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E8=BF=9B=E5=85=A5=E7=9A=84=E7=BB=84=E4=BB=B6=E5=9B=BE?= =?UTF-8?q?=E5=B1=82=E6=94=BE=E5=9C=A8=E6=9C=80=E9=A1=B6=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/views/data-visualization/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-frontend/src/views/data-visualization/index.vue b/core/core-frontend/src/views/data-visualization/index.vue index 545893cd68..69cc98bd5e 100644 --- a/core/core-frontend/src/views/data-visualization/index.vue +++ b/core/core-frontend/src/views/data-visualization/index.vue @@ -109,7 +109,7 @@ const handleDrop = e => { component.style.left = e.clientX - rectInfo.x component.id = guid() changeComponentSizeWithScale(component) - dvMainStore.addComponent({ component: component, index: 0 }) + dvMainStore.addComponent({ component: component, index: undefined }) adaptCurThemeCommonStyle(component) snapshotStore.recordSnapshotCache('renderChart', component.id) } From 198b690d16f53ff0d808cc92f585adc124b38f43 Mon Sep 17 00:00:00 2001 From: junjun Date: Tue, 26 Dec 2023 10:00:30 +0800 Subject: [PATCH 13/13] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E7=BB=84=E4=BB=B6=E8=BF=87=E6=BB=A4=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=88=B3=E4=B8=8D=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20#7313?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/dataease/engine/constant/SQLConstants.java | 2 ++ .../src/main/java/io/dataease/engine/trans/ExtWhere2Str.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java b/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java index 57d23ee7fd..3bbd366ce4 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java +++ b/core/core-backend/src/main/java/io/dataease/engine/constant/SQLConstants.java @@ -87,6 +87,8 @@ public class SQLConstants { public static final String WHERE_BETWEEN = "'%s' AND '%s'"; + public static final String WHERE_CALUE_BETWEEN = "%s AND %s"; + public static final String BRACKETS = "(%s)"; public static final String ROUND = "ROUND(%s,%s)"; diff --git a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java index 52ebf29b35..7d658635f5 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java +++ b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java @@ -107,7 +107,7 @@ public class ExtWhere2Str { if (request.getDatasetTableField().getDeExtractType() == 2 || request.getDatasetTableField().getDeExtractType() == 3 || request.getDatasetTableField().getDeExtractType() == 4) { - whereValue = String.format(SQLConstants.WHERE_BETWEEN, value.get(0), value.get(1)); + whereValue = String.format(SQLConstants.WHERE_CALUE_BETWEEN, value.get(0), value.get(1)); } else { whereName = String.format(SQLConstants.UNIX_TIMESTAMP, whereName); whereValue = String.format(SQLConstants.WHERE_BETWEEN, Long.parseLong(value.get(0)), Long.parseLong(value.get(1)));