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/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);