From d5c0a625fa3c9d73c6583e9f8424ac6f7ac2da55 Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 24 Feb 2022 14:33:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E4=B8=AD=E6=95=B0=E6=8D=AE=E9=9B=86=E5=AD=97=E6=AE=B5=E3=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=8C=E6=9C=AA=E5=8F=97=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/dataset/DataSetTableService.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 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 e2fc21d256..c621e531b4 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -405,7 +405,7 @@ public class DataSetTableService { public DataSetTableDTO getWithPermission(String id, Long user) { CurrentUserDto currentUserDto = AuthUtils.getUser(); - Long userId = user != null ? currentUserDto.getUserId() : user; + Long userId = user != null ? user : currentUserDto.getUserId(); DataSetTableRequest dataSetTableRequest = new DataSetTableRequest(); dataSetTableRequest.setId(id); @@ -464,7 +464,7 @@ public class DataSetTableService { } public Map getPreviewData(DataSetTableRequest dataSetTableRequest, Integer page, Integer pageSize, - List extFields) throws Exception { + List extFields) throws Exception { Map map = new HashMap<>(); DatasetTableField datasetTableField = DatasetTableField.builder().tableId(dataSetTableRequest.getId()) .checked(Boolean.TRUE).build(); @@ -926,8 +926,8 @@ public class DataSetTableService { DorisTableUtils.dorisFieldName( datasetTableField.getTableId() + "_" + datasetTableField.getDataeaseName())) || StringUtils.equalsIgnoreCase(tableField.getFieldName(), - DorisTableUtils.dorisFieldNameShort(datasetTableField.getTableId() + "_" - + datasetTableField.getOriginName()))) { + DorisTableUtils.dorisFieldNameShort(datasetTableField.getTableId() + "_" + + datasetTableField.getOriginName()))) { tableField.setRemarks(datasetTableField.getName()); break; } @@ -990,7 +990,7 @@ public class DataSetTableService { DorisTableUtils.dorisFieldName( datasetTableField.getTableId() + "_" + datasetTableField.getDataeaseName())) || StringUtils.equalsIgnoreCase(tableField.getFieldName(), DorisTableUtils.dorisFieldName( - datasetTableField.getTableId() + "_" + datasetTableField.getOriginName()))) { + datasetTableField.getTableId() + "_" + datasetTableField.getOriginName()))) { tableField.setRemarks(datasetTableField.getName()); break; } @@ -1073,7 +1073,7 @@ public class DataSetTableService { } public String getCustomSQLDatasource(DataTableInfoDTO dataTableInfoDTO, List list, - Datasource ds) { + Datasource ds) { DatasourceTypes datasourceTypes = DatasourceTypes.valueOf(ds.getType()); String keyword = datasourceTypes.getKeywordPrefix() + "%s" + datasourceTypes.getKeywordSuffix(); Map customInfo = new TreeMap<>(); @@ -1260,7 +1260,7 @@ public class DataSetTableService { // 递归计算出所有子级的checkedFields和unionParam private void getUnionSQLDorisJoin(List childrenDs, Map checkedInfo, - List unionList, List checkedFields) { + List unionList, List checkedFields) { for (int i = 0; i < childrenDs.size(); i++) { UnionDTO unionDTO = childrenDs.get(i); String tableId = unionDTO.getCurrentDs().getId(); @@ -1398,7 +1398,7 @@ public class DataSetTableService { // 递归计算出所有子级的checkedFields和unionParam private void getUnionSQLDatasourceJoin(List childrenDs, Map checkedInfo, - List unionList, String keyword, List checkedFields) { + List unionList, String keyword, List checkedFields) { for (int i = 0; i < childrenDs.size(); i++) { UnionDTO unionDTO = childrenDs.get(i); @@ -1703,10 +1703,10 @@ public class DataSetTableService { if (datasetTableIncrementalConfig == null || StringUtils.isEmpty(datasetTableIncrementalConfig.getTableId())) { return; } - if(StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalAdd())){ + if (StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalAdd())) { datasetTableIncrementalConfig.setIncrementalAdd(datasetTableIncrementalConfig.getIncrementalAdd().trim()); } - if(StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalDelete())){ + if (StringUtils.isNotEmpty(datasetTableIncrementalConfig.getIncrementalDelete())) { datasetTableIncrementalConfig.setIncrementalDelete(datasetTableIncrementalConfig.getIncrementalDelete().trim()); } if (StringUtils.isEmpty(datasetTableIncrementalConfig.getId())) {