forked from github/dataease
perf: xpack嵌入式版
This commit is contained in:
parent
c4a5bdb40a
commit
fe1c7dadab
@ -211,7 +211,7 @@ public class DatasetDataManage {
|
||||
}
|
||||
|
||||
public Long getDatasetTotal(Long datasetGroupId) throws Exception {
|
||||
DatasetGroupInfoDTO dto = datasetGroupManage.get(datasetGroupId, null);
|
||||
DatasetGroupInfoDTO dto = datasetGroupManage.getForCount(datasetGroupId);
|
||||
if (StringUtils.equalsIgnoreCase(dto.getNodeType(), "dataset")) {
|
||||
return getDatasetTotal(dto);
|
||||
}
|
||||
|
@ -346,6 +346,30 @@ public class DatasetGroupManage {
|
||||
}
|
||||
}
|
||||
|
||||
public DatasetGroupInfoDTO getForCount(Long id) throws Exception {
|
||||
CoreDatasetGroup coreDatasetGroup = coreDatasetGroupMapper.selectById(id);
|
||||
if (coreDatasetGroup == null) {
|
||||
return null;
|
||||
}
|
||||
DatasetGroupInfoDTO dto = new DatasetGroupInfoDTO();
|
||||
BeanUtils.copyBean(dto, coreDatasetGroup);
|
||||
if (StringUtils.equalsIgnoreCase(dto.getNodeType(), "dataset")) {
|
||||
dto.setUnion(JsonUtil.parseList(coreDatasetGroup.getInfo(), new TypeReference<>() {
|
||||
}));
|
||||
// 获取field
|
||||
List<DatasetTableFieldDTO> dsFields = datasetTableFieldManage.selectByDatasetGroupId(id);
|
||||
List<DatasetTableFieldDTO> allFields = dsFields.stream().map(ele -> {
|
||||
DatasetTableFieldDTO datasetTableFieldDTO = new DatasetTableFieldDTO();
|
||||
BeanUtils.copyBean(datasetTableFieldDTO, ele);
|
||||
datasetTableFieldDTO.setFieldShortName(ele.getDataeaseName());
|
||||
return datasetTableFieldDTO;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
dto.setAllFields(allFields);
|
||||
}
|
||||
return dto;
|
||||
}
|
||||
|
||||
public DatasetGroupInfoDTO get(Long id, String type) throws Exception {
|
||||
CoreDatasetGroup coreDatasetGroup = coreDatasetGroupMapper.selectById(id);
|
||||
if (coreDatasetGroup == null) {
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit a6f7aa3f644fe258d9ed14cca420c3f6c4aeb1cd
|
||||
Subproject commit 9088bf9f2fcea60e26db765c1307b04e6567cf93
|
Loading…
Reference in New Issue
Block a user