From 999fc9f5a207e62cc1a17b99622f04dcac98644d Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 3 Apr 2024 14:17:39 +0800 Subject: [PATCH 1/8] =?UTF-8?q?refactor(=E5=B7=A5=E4=BD=9C=E5=8F=B0):=20?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E8=B5=84=E6=BA=90=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/share/dao/ext/mapper/XpackShareExtMapper.java | 1 + .../java/io/dataease/share/dao/ext/po/XpackSharePO.java | 2 ++ .../java/io/dataease/share/manage/XpackShareManage.java | 2 +- .../visualization/dao/ext/mapper/CoreStoreExtMapper.java | 3 ++- .../java/io/dataease/visualization/dao/ext/po/StorePO.java | 2 ++ .../visualization/dao/ext/po/VisualizationResourcePO.java | 2 ++ .../visualization/manage/CoreVisualizationManage.java | 2 +- .../visualization/manage/VisualizationStoreManage.java | 2 +- .../main/resources/mybatis/ExtDataVisualizationMapper.xml | 5 +++++ core/core-frontend/src/views/share/share/ShareGrid.vue | 7 ++++++- core/core-frontend/src/views/workbranch/ShortcutTable.vue | 7 ++++++- .../dataease/api/visualization/vo/DataVisualizationVO.java | 4 ++++ .../api/visualization/vo/VisualizationResourceVO.java | 2 ++ .../api/visualization/vo/VisualizationStoreVO.java | 2 ++ .../io/dataease/api/xpack/share/vo/XpackShareGridVO.java | 2 ++ 15 files changed, 39 insertions(+), 6 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/share/dao/ext/mapper/XpackShareExtMapper.java b/core/core-backend/src/main/java/io/dataease/share/dao/ext/mapper/XpackShareExtMapper.java index 4b122e87b7..140f0b0a1a 100644 --- a/core/core-backend/src/main/java/io/dataease/share/dao/ext/mapper/XpackShareExtMapper.java +++ b/core/core-backend/src/main/java/io/dataease/share/dao/ext/mapper/XpackShareExtMapper.java @@ -14,6 +14,7 @@ public interface XpackShareExtMapper { select s.id as share_id, v.id as resource_id, + v.mobile_layout as ext_flag, v.type, s.creator, s.time, diff --git a/core/core-backend/src/main/java/io/dataease/share/dao/ext/po/XpackSharePO.java b/core/core-backend/src/main/java/io/dataease/share/dao/ext/po/XpackSharePO.java index 9b89fb7b03..26a3a3afe4 100644 --- a/core/core-backend/src/main/java/io/dataease/share/dao/ext/po/XpackSharePO.java +++ b/core/core-backend/src/main/java/io/dataease/share/dao/ext/po/XpackSharePO.java @@ -28,4 +28,6 @@ public class XpackSharePO implements Serializable { private Long exp; + private Integer extFlag; + } diff --git a/core/core-backend/src/main/java/io/dataease/share/manage/XpackShareManage.java b/core/core-backend/src/main/java/io/dataease/share/manage/XpackShareManage.java index c325161e67..ee5fababab 100644 --- a/core/core-backend/src/main/java/io/dataease/share/manage/XpackShareManage.java +++ b/core/core-backend/src/main/java/io/dataease/share/manage/XpackShareManage.java @@ -139,7 +139,7 @@ public class XpackShareManage { return pos.stream().map(po -> new XpackShareGridVO( po.getShareId(), po.getResourceId(), po.getName(), po.getCreator().toString(), - po.getTime(), po.getExp(), 9)).toList(); + po.getTime(), po.getExp(), 9,po.getExtFlag())).toList(); } private XpackShareManage proxy() { diff --git a/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/mapper/CoreStoreExtMapper.java b/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/mapper/CoreStoreExtMapper.java index b80422a81a..8401dfc450 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/mapper/CoreStoreExtMapper.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/mapper/CoreStoreExtMapper.java @@ -18,7 +18,8 @@ public interface CoreStoreExtMapper { v.create_by as creator, v.update_by as editor, v.update_time as edit_time, - v.name + v.name, + v.mobile_layout as ext_flag from core_store s left join data_visualization_info v on s.resource_id = v.id ${ew.customSqlSegment} diff --git a/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/po/StorePO.java b/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/po/StorePO.java index 6e3d07f422..2127dd42c3 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/po/StorePO.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/po/StorePO.java @@ -24,4 +24,6 @@ public class StorePO implements Serializable { private String name; + private Integer extFlag; + } diff --git a/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/po/VisualizationResourcePO.java b/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/po/VisualizationResourcePO.java index 8d2fee81f5..6101c7b27f 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/po/VisualizationResourcePO.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/dao/ext/po/VisualizationResourcePO.java @@ -35,4 +35,6 @@ public class VisualizationResourcePO implements Serializable { private Boolean favorite; private int weight; + + private Integer extFlag; } diff --git a/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationManage.java b/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationManage.java index ee57ce584b..8ecd8f045a 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationManage.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/manage/CoreVisualizationManage.java @@ -176,7 +176,7 @@ public class CoreVisualizationManage { new VisualizationResourceVO( po.getId(), po.getResourceId(), po.getName(), po.getType(), String.valueOf(po.getCreator()), String.valueOf(po.getLastEditor()), po.getLastEditTime(), - po.getFavorite(), 9)).toList(); + po.getFavorite(), 9,po.getExtFlag())).toList(); } public IPage queryVisualizationPage(int goPage, int pageSize, VisualizationWorkbranchQueryRequest request) { diff --git a/core/core-backend/src/main/java/io/dataease/visualization/manage/VisualizationStoreManage.java b/core/core-backend/src/main/java/io/dataease/visualization/manage/VisualizationStoreManage.java index 31fd4340ba..23993efc0e 100644 --- a/core/core-backend/src/main/java/io/dataease/visualization/manage/VisualizationStoreManage.java +++ b/core/core-backend/src/main/java/io/dataease/visualization/manage/VisualizationStoreManage.java @@ -89,7 +89,7 @@ public class VisualizationStoreManage { new VisualizationStoreVO( po.getStoreId(), po.getResourceId(), po.getName(), po.getType(), String.valueOf(po.getCreator()), ObjectUtils.isEmpty(po.getEditor()) ? null : String.valueOf(po.getEditor()), - po.getEditTime(), 9)).toList(); + po.getEditTime(), 9,po.getExtFlag())).toList(); } public IPage queryStorePage(int goPage, int pageSize, VisualizationWorkbranchQueryRequest request) { diff --git a/core/core-backend/src/main/resources/mybatis/ExtDataVisualizationMapper.xml b/core/core-backend/src/main/resources/mybatis/ExtDataVisualizationMapper.xml index 299595e611..dffa15698b 100644 --- a/core/core-backend/src/main/resources/mybatis/ExtDataVisualizationMapper.xml +++ b/core/core-backend/src/main/resources/mybatis/ExtDataVisualizationMapper.xml @@ -143,6 +143,7 @@ `canvas_style_data`, `component_data`, `mobile_layout`, + `mobile_layout` as ext_flag, `status`, `self_watermark_status`, `sort`, @@ -165,6 +166,7 @@ SELECT dvResource.id, dvResource.resource_id, dvResource.name, + dvResource.ext_flag, dvResource.type, dvResource.creator, core_opt_recent.uid AS last_editor, @@ -180,6 +182,7 @@ FROM (SELECT core_dataset_group.id, core_dataset_group.id AS resource_id, core_dataset_group.NAME, + 0 as ext_flag, 'dataset' AS type, core_dataset_group.create_by AS creator FROM core_dataset_group @@ -188,6 +191,7 @@ SELECT core_datasource.id, core_datasource.id AS resource_id, core_datasource.NAME, + 0 as ext_flag, 'datasource' AS type, core_datasource.create_by AS creator FROM core_datasource @@ -197,6 +201,7 @@ data_visualization_info.id, data_visualization_info.id AS resource_id, data_visualization_info.NAME, + data_visualization_info.`mobile_layout` as ext_flag, ( CASE data_visualization_info.type diff --git a/core/core-frontend/src/views/share/share/ShareGrid.vue b/core/core-frontend/src/views/share/share/ShareGrid.vue index b01fd82c8f..f690c810c9 100644 --- a/core/core-frontend/src/views/share/share/ShareGrid.vue +++ b/core/core-frontend/src/views/share/share/ShareGrid.vue @@ -164,7 +164,12 @@ watch(