From 065b3340649939089ba3106cf81de621edecc214 Mon Sep 17 00:00:00 2001 From: junjie Date: Fri, 23 Jul 2021 12:42:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=96=E8=BE=91=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=85=A8=E4=B8=8D=E9=80=89=E5=90=8E=E5=BC=B9=E6=A1=86=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/service/dataset/DataSetTableService.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 0b466262f8..00c54ea4e5 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -299,6 +299,12 @@ public class DataSetTableService { datasetTableField.setTableId(dataSetTableRequest.getId()); datasetTableField.setChecked(Boolean.TRUE); List fields = dataSetTableFieldsService.list(datasetTableField); + if (CollectionUtils.isEmpty(fields)) { + map.put("fields", fields); + map.put("data", new ArrayList<>()); + map.put("page", new DataSetPreviewPage()); + return map; + } String[] fieldArray = fields.stream().map(DatasetTableField::getDataeaseName).toArray(String[]::new); DataTableInfoDTO dataTableInfoDTO = new Gson().fromJson(dataSetTableRequest.getInfo(), DataTableInfoDTO.class);