Skip to content

Commit

Permalink
Fix query scene bug
Browse files Browse the repository at this point in the history
Signed-off-by: fanyinbo <[email protected]>
  • Loading branch information
fanyinbo committed Nov 28, 2023
1 parent f8088f3 commit ddbf8bc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public Wrapper<DataInfo> commonDataQueryWrapper(DataInfoQueryBO queryBO) {

private void setSceneFirstData(Long datasetId, List<DataInfoBO> dataInfoBOList) {
List<Long> 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);
}
Expand All @@ -338,7 +338,7 @@ private void setSceneFirstData(Long datasetId, List<DataInfoBO> 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));
Expand Down

0 comments on commit ddbf8bc

Please sign in to comment.