perf: xpack嵌入式版

This commit is contained in:
fit2cloud-chenyw 2023-11-16 17:18:54 +08:00
parent c4a5bdb40a
commit fe1c7dadab
3 changed files with 26 additions and 2 deletions

View File

@ -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);
}

View File

@ -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) {

@ -1 +1 @@
Subproject commit a6f7aa3f644fe258d9ed14cca420c3f6c4aeb1cd
Subproject commit 9088bf9f2fcea60e26db765c1307b04e6567cf93