收音机 / 客户端 商品列表
This commit is contained in:
@@ -181,7 +181,10 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||
lowMemberPriceIsPresent.ifPresent(record::setLowMemberPrice);
|
||||
}
|
||||
record.setSkuList(skuList);
|
||||
record.setProdConsRelations(prodConsRelationMapper.selectListByQuery(query().eq(ProdConsRelation::getProductId, record.getId()).eq(ProdConsRelation::getShopId, record.getShopId())));
|
||||
record.setProdConsRelations(prodConsRelationMapper.selectListByQuery(query()
|
||||
.eq(ProdConsRelation::getProductId, record.getId())
|
||||
.eq(ConsInfo::getStatus, SystemConstants.OneZero.ONE)
|
||||
.eq(ProdConsRelation::getShopId, record.getShopId())));
|
||||
});
|
||||
return records;
|
||||
}
|
||||
@@ -334,7 +337,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductDTO> getProductCacheList(Long shopId, Long categoryId) {
|
||||
public Map<String, Object> getProductCacheList(Long shopId, Long categoryId) {
|
||||
String key = ADMIN_CLIENT_PRODUCT_LIST + "::" + shopId + "::" + categoryId;
|
||||
List<ProductDTO> list;
|
||||
if (!redisService.hasKey(key)) {
|
||||
@@ -349,7 +352,8 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||
.sorted(Comparator.comparingInt(ProductDTO::getSort).reversed())
|
||||
.sorted(Comparator.comparingLong(ProductDTO::getId).reversed())
|
||||
.toList();
|
||||
return list;
|
||||
List<ConsInfo> consInfos = consInfoMapper.selectListByQuery(query().eq(ConsInfo::getShopId, shopId).eq(ConsInfo::getStatus, SystemConstants.OneZero.ONE));
|
||||
return Map.of("productList", list, "cons", consInfos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user