From 5f8f93f7d44a5caaee143a22d0a5cfd4a0a9b233 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Sat, 28 May 2022 10:49:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20excel=20=E6=9B=BF=E6=8D=A2=E3=80=81?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/service/dataset/DataSetTableService.java | 4 +++- .../java/io/dataease/service/dataset/ExtractDataService.java | 3 ++- 2 files changed, 5 insertions(+), 2 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 753420b979..e47240e1ba 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -53,6 +53,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; @@ -146,6 +147,7 @@ public class DataSetTableService { } } + @Transactional(propagation = Propagation.NOT_SUPPORTED) @DeCleaner(value = DePermissionType.DATASET, key = "sceneId") public void saveExcel(DataSetTableRequest datasetTable) throws Exception { List datasetIdList = new ArrayList<>(); @@ -357,7 +359,7 @@ public class DataSetTableService { public List list(List datasetIds) { DatasetTableExample example = new DatasetTableExample(); example.createCriteria().andIdIn(datasetIds); - return datasetTableMapper.selectByExample(example); + return datasetTableMapper.selectByExampleWithBLOBs(example); } public List listAndGroup(DataSetTableRequest dataSetTableRequest) { diff --git a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java index 8be0a597d3..79bc9c6476 100644 --- a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java +++ b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java @@ -432,7 +432,8 @@ public class ExtractDataService { } private void extractApiData(DatasetTable datasetTable, Datasource datasource, List datasetTableFields, String extractType) throws Exception { - List lists = new Gson().fromJson(datasource.getConfiguration(), new TypeToken>(){}.getType()); + List lists = new Gson().fromJson(datasource.getConfiguration(), new TypeToken>() { + }.getType()); lists = lists.stream().filter(item -> item.getName().equalsIgnoreCase(new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class).getTable())).collect(Collectors.toList()); if (CollectionUtils.isEmpty(lists)) { throw new Exception("未找到API数据表");