商品模块代码提交
This commit is contained in:
parent
6a48c6b345
commit
ceb5343542
|
|
@ -91,6 +91,9 @@ public class UProductServiceImpl extends ServiceImpl<ProductMapper, Product> imp
|
|||
|
||||
private List<MiniAppHomeProductInfoVo> buildProductList(QueryWrapper queryWrapper) {
|
||||
List<ProductDTO> dtoList = productMapper.selectListByQueryAs(queryWrapper, ProductDTO.class);
|
||||
if (CollUtil.isEmpty(dtoList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<Long> prodIdList = dtoList.stream().map(ProductDTO::getId).distinct().toList();
|
||||
List<ProdSkuDTO> skuList = prodSkuMapper.selectListByQueryAs(query().in(ProdSku::getProductId, prodIdList).eq(ProdSku::getIsDel, DeleteEnum.NORMAL.value()), ProdSkuDTO.class);
|
||||
Map<Long, List<ProdSkuDTO>> collect = skuList.stream().collect(Collectors.groupingBy(ProdSkuDTO::getProductId));
|
||||
|
|
|
|||
Loading…
Reference in New Issue