Merge branch 'dev/dev_xp' into dev/3.1_release_merge
This commit is contained in:
@@ -521,6 +521,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
||||
.map(DesignCollectionPrintElementDTO::getId)
|
||||
.collect(Collectors.toList());
|
||||
List<CollectionElement> printBoardElements = new ArrayList<>();
|
||||
elementVO.setPrintBoardElements(printBoardElements);
|
||||
if (!CollectionUtils.isEmpty(printBoardIds)) {
|
||||
// 从数据库批量查询printBoard元素
|
||||
printBoardElements = collectionElementMapper.selectBatchIds(printBoardIds);
|
||||
@@ -528,7 +529,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
||||
if (CollectionUtil.isEmpty(printBoardElements) || printBoardElements.size() != printBoardIds.size()) {
|
||||
throw new BusinessException("get.printBoards.data.is.mismatch");
|
||||
}
|
||||
elementVO.setPrintBoardElements(printBoardElements);
|
||||
// elementVO.setPrintBoardElements(printBoardElements);
|
||||
usedElementIds.addAll(printBoardIds); // 记录已使用的元素ID
|
||||
}
|
||||
// 处理类型为LIBRARY的printBoard元素
|
||||
|
||||
@@ -764,7 +764,20 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
||||
getPrintboardLevel2TypeQw.lambda().orderByDesc(CollectionElement::getCreateDate);
|
||||
getPrintboardLevel2TypeQw.last("limit 1");
|
||||
CollectionElement one = collectionElementService.getOne(getPrintboardLevel2TypeQw);
|
||||
print.setLevel2Type(one.getLevel2Type());
|
||||
if (Objects.isNull(one)) {
|
||||
QueryWrapper<Library> libraryQueryWrapper = new QueryWrapper<>();
|
||||
libraryQueryWrapper.lambda().eq(Library::getUrl, print.getPath());
|
||||
libraryQueryWrapper.lambda().orderByDesc(Library::getCreateDate);
|
||||
getPrintboardLevel2TypeQw.last("limit 1");
|
||||
Library library = libraryService.getOne(libraryQueryWrapper);
|
||||
if (Objects.isNull(library)) {
|
||||
print.setLevel2Type("Pattern");
|
||||
} else {
|
||||
print.setLevel2Type(library.getLevel2Type());
|
||||
}
|
||||
} else {
|
||||
print.setLevel2Type(one.getLevel2Type());
|
||||
}
|
||||
print.setCreateDate(LocalDateTime.now());
|
||||
designItemDetailPrintService.save(print);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user