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 e36ce10a5b..7ddd18503b 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -102,7 +102,14 @@ public class DataSetTableService { DatasourceRequest datasourceRequest = new DatasourceRequest(); datasourceRequest.setDatasource(ds); String table = new Gson().fromJson(dataSetTableRequest.getInfo(), DataTableInfoDTO.class).getTable(); - datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, new String[]{"*"})); + + DatasetTableField datasetTableField = new DatasetTableField(); + datasetTableField.setTableId(dataSetTableRequest.getId()); + datasetTableField.setChecked(Boolean.TRUE); + List fields = dataSetTableFieldsService.list(datasetTableField); + String[] fieldArray = fields.stream().map(DatasetTableField::getOriginName).toArray(String[]::new); + datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray)); + return datasourceProvider.getData(datasourceRequest); } diff --git a/frontend/src/business/components/dataset/DataSet.vue b/frontend/src/business/components/dataset/DataSet.vue index e0c29585ef..337fa954d5 100644 --- a/frontend/src/business/components/dataset/DataSet.vue +++ b/frontend/src/business/components/dataset/DataSet.vue @@ -1,33 +1,33 @@