diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/ExtChartGroupMapper.xml b/backend/src/main/java/io/dataease/base/mapper/ext/ExtChartGroupMapper.xml index b960f03e6e..0f3dd05c4d 100644 --- a/backend/src/main/java/io/dataease/base/mapper/ext/ExtChartGroupMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/ext/ExtChartGroupMapper.xml @@ -20,7 +20,7 @@ and chart_group.id = #{id,jdbcType=VARCHAR} - and chart_group.`name` = CONCAT('%', #{name},'%') + and chart_group.`name` like CONCAT('%', #{name},'%') and chart_group.pid = #{pid,jdbcType=VARCHAR} diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/ExtDataSetGroupMapper.xml b/backend/src/main/java/io/dataease/base/mapper/ext/ExtDataSetGroupMapper.xml index 85d2753c85..d01211f0f1 100644 --- a/backend/src/main/java/io/dataease/base/mapper/ext/ExtDataSetGroupMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/ext/ExtDataSetGroupMapper.xml @@ -20,7 +20,7 @@ and dataset_group.id = #{id,jdbcType=VARCHAR} - and dataset_group.`name` = CONCAT('%', #{name},'%') + and dataset_group.`name` like CONCAT('%', #{name},'%') and dataset_group.pid = #{pid,jdbcType=VARCHAR} diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml b/backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml index 56671a29e7..3b4eed03da 100644 --- a/backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml @@ -19,7 +19,7 @@ model_type = #{modelType} - and ( v_auth_model.type ='spine' OR ( v_auth_model.create_by = #{createBy} AND v_auth_model.type = 'leaf')) + and FIND_IN_SET(v_auth_model.id,GET_V_AUTH_MODEL_WITH_PARENT ( (select GROUP_CONCAT(id) from v_auth_model where model_type = #{modelType} and create_by =#{createBy}) ,#{modelType})) and v_auth_model.pid = #{pid} @@ -54,7 +54,7 @@ model_type = #{modelType} - and ( v_auth_model.type ='spine' OR ( v_auth_model.create_by = #{createBy} AND v_auth_model.type = 'leaf')) + and FIND_IN_SET(v_auth_model.id,GET_V_AUTH_MODEL_WITH_PARENT ( (select GROUP_CONCAT(id) from v_auth_model where model_type = #{modelType} and create_by =#{createBy}) ,#{modelType})) ) authTemp @@ -64,7 +64,7 @@ auth.id = authCount.pid - (chartcount.children_count>0 or chart.create_by = #{createBy}) + (authCount.children_count>0 or auth.create_by = #{createBy}) diff --git a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java index 1a979c8090..6966b6611c 100644 --- a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java +++ b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java @@ -51,7 +51,7 @@ public class DatasourceService { datasource.setId(UUID.randomUUID().toString()); datasource.setUpdateTime(currentTimeMillis); datasource.setCreateTime(currentTimeMillis); - datasource.setCreateBy(String.valueOf(AuthUtils.getUser().getUserId())); + datasource.setCreateBy(String.valueOf(AuthUtils.getUser().getUsername())); datasourceMapper.insertSelective(datasource); return datasource; } diff --git a/backend/src/main/java/io/dataease/service/chart/ChartGroupService.java b/backend/src/main/java/io/dataease/service/chart/ChartGroupService.java index 80a6266de2..8977454993 100644 --- a/backend/src/main/java/io/dataease/service/chart/ChartGroupService.java +++ b/backend/src/main/java/io/dataease/service/chart/ChartGroupService.java @@ -46,8 +46,9 @@ public class ChartGroupService { } public void delete(String id) { + ChartGroup cg = chartGroupMapper.selectByPrimaryKey(id); ChartGroupRequest ChartGroup = new ChartGroupRequest(); - ChartGroup.setId(id); + BeanUtils.copyBean(ChartGroup, cg); List tree = tree(ChartGroup); List ids = new ArrayList<>(); getAllId(tree, ids); @@ -70,7 +71,7 @@ public class ChartGroupService { public List tree(ChartGroupRequest chartGroup) { chartGroup.setUserId(String.valueOf(AuthUtils.getUser().getUserId())); - if(chartGroup.getLevel() == null){ + if (chartGroup.getLevel() == null) { chartGroup.setLevel(0); } List treeInfo = extChartGroupMapper.search(chartGroup); diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java index 6ec48233c7..48cbe0d7c2 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetGroupService.java @@ -51,9 +51,10 @@ public class DataSetGroupService { return dataSetGroupDTO; } - public void delete(String id) throws Exception{ + public void delete(String id) throws Exception { + DatasetGroup dg = datasetGroupMapper.selectByPrimaryKey(id); DataSetGroupRequest datasetGroup = new DataSetGroupRequest(); - datasetGroup.setId(id); + BeanUtils.copyBean(datasetGroup, dg); List tree = tree(datasetGroup); List ids = new ArrayList<>(); getAllId(tree, ids); @@ -68,7 +69,7 @@ public class DataSetGroupService { return datasetGroupMapper.selectByPrimaryKey(id); } - public void deleteTableAndField(List sceneIds) throws Exception{ + public void deleteTableAndField(List sceneIds) throws Exception { for (String sceneId : sceneIds) { DataSetTableRequest dataSetTableRequest = new DataSetTableRequest(); dataSetTableRequest.setSceneId(sceneId); @@ -81,7 +82,7 @@ public class DataSetGroupService { public List tree(DataSetGroupRequest datasetGroup) { datasetGroup.setUserId(String.valueOf(AuthUtils.getUser().getUserId())); - if(datasetGroup.getLevel() == null){ + if (datasetGroup.getLevel() == null) { datasetGroup.setLevel(0); } List treeInfo = extDataSetGroupMapper.search(datasetGroup); diff --git a/backend/src/main/resources/db/migration/V2__dataease_ddl.sql b/backend/src/main/resources/db/migration/V2__dataease_ddl.sql index 5b9a856372..1356b3fb77 100644 --- a/backend/src/main/resources/db/migration/V2__dataease_ddl.sql +++ b/backend/src/main/resources/db/migration/V2__dataease_ddl.sql @@ -36,6 +36,7 @@ CREATE TABLE IF NOT EXISTS `user_role` ( )ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; +DROP TABLE IF EXISTS `datasource`; CREATE TABLE `datasource` ( `id` varchar(50) NOT NULL DEFAULT '' COMMENT 'ID', `name` varchar(50) NOT NULL COMMENT '名称', @@ -467,4 +468,4 @@ CREATE TABLE `my_plugin` ( `bean_name` varchar(40) DEFAULT NULL COMMENT 'bean名称', `icon` varchar(255) DEFAULT NULL COMMENT '图标', PRIMARY KEY (`plugin_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/frontend/src/assets/DataEase-color.png b/frontend/src/assets/DataEase-color.png index 3fafa755eb..c3c0ccd022 100644 Binary files a/frontend/src/assets/DataEase-color.png and b/frontend/src/assets/DataEase-color.png differ diff --git a/frontend/src/layout/components/Topbar.vue b/frontend/src/layout/components/Topbar.vue index 6401799c43..80d6bba935 100644 --- a/frontend/src/layout/components/Topbar.vue +++ b/frontend/src/layout/components/Topbar.vue @@ -1,14 +1,14 @@ - + - + @@ -229,7 +229,7 @@ export default {