From ddbf8bca2c752dbb1818ab722f007e10694ca1d3 Mon Sep 17 00:00:00 2001 From: fanyinbo <1553199396@qq.com> Date: Tue, 28 Nov 2023 16:15:03 +0800 Subject: [PATCH] Fix query scene bug Signed-off-by: fanyinbo <1553199396@qq.com> --- .../src/main/java/ai/basic/x1/usecase/DataInfoUseCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/ai/basic/x1/usecase/DataInfoUseCase.java b/backend/src/main/java/ai/basic/x1/usecase/DataInfoUseCase.java index 15b2d3fb..0ea2a34b 100644 --- a/backend/src/main/java/ai/basic/x1/usecase/DataInfoUseCase.java +++ b/backend/src/main/java/ai/basic/x1/usecase/DataInfoUseCase.java @@ -329,7 +329,7 @@ public Wrapper commonDataQueryWrapper(DataInfoQueryBO queryBO) { private void setSceneFirstData(Long datasetId, List dataInfoBOList) { List dataIds = null; - var sceneIds = dataInfoBOList.stream().filter(dataInfoBO -> SCENE.equals(dataInfoBO.getType())).map(DataInfoBO::getId).collect(Collectors.toList()); + var sceneIds = dataInfoBOList.stream().filter(dataInfoBO -> ItemTypeEnum.SCENE.equals(dataInfoBO.getType())).map(DataInfoBO::getId).collect(Collectors.toList()); if (CollectionUtil.isNotEmpty(sceneIds)) { dataIds = dataInfoDAO.getBaseMapper().selectFirstDataIdBySceneIds(datasetId, sceneIds); } @@ -338,7 +338,7 @@ private void setSceneFirstData(Long datasetId, List dataInfoBOList) var sceneDataInfoMap = dataInfoList.stream() .collect(Collectors.toMap(DataInfo::getParentId, dataInfo -> dataInfo, (k1, k2) -> k1)); dataInfoBOList.forEach(dataInfoBO -> { - if (SCENE.equals(dataInfoBO.getType())) { + if (ItemTypeEnum.SCENE.equals(dataInfoBO.getType())) { var dataInfo = sceneDataInfoMap.get(dataInfoBO.getId()); if (ObjectUtil.isNotNull(dataInfo)) { dataInfoBO.setContent(DefaultConverter.convert(dataInfo.getContent(), DataInfoBO.FileNodeBO.class));