TASK:模块化;

This commit is contained in:
shahaibo
2025-03-27 13:38:47 +08:00
parent e6234213f0
commit 33582922be
2 changed files with 13 additions and 0 deletions

View File

@@ -31,4 +31,6 @@ public class QueryLibraryPageServiceDTO extends PageQueryBaseVo {
@ApiModelProperty("1交集2并集")
private Integer intersection;
private Long brandId;
}

View File

@@ -96,6 +96,9 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
@Resource
private PythonTAllInfoService pythonTAllInfoService;
@Resource
private BrandRelLibraryMapper brandRelLibraryMapper;
private static List<String> top = Arrays.asList(CollectionLevel2TypeEnum.DRESS.getRealName(),
CollectionLevel2TypeEnum.OUTWEAR.getRealName(), CollectionLevel2TypeEnum.BLOUSE.getRealName());
private static List<String> bottom = Arrays.asList(CollectionLevel2TypeEnum.SKIRT.getRealName(),
@@ -155,6 +158,14 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
if (!StringUtils.isEmpty(query.getPictureName())) {
queryWrapper.like("name", query.getPictureName());
}
if (query.getBrandId() != null) {
QueryWrapper<BrandRelLibrary> qw = new QueryWrapper<>();
qw.lambda().eq(BrandRelLibrary::getBrandId, query.getBrandId());
Set<Long> collect = brandRelLibraryMapper.selectList(qw).stream().map(BrandRelLibrary::getLibraryId).collect(Collectors.toSet());
queryWrapper.in("id", collect);
}
// 新增分类过滤
if (CollectionUtil.isNotEmpty(query.getClassificationIdList())) {
List<Long> libraryIdList = new ArrayList<>();