fix: 商品列表返回会员价修改

This commit is contained in:
张松
2024-11-07 15:57:30 +08:00
parent bc0bcf67a8
commit c8f96e85ef

View File

@@ -225,15 +225,15 @@ public class ProductService {
Integer id = ObjectUtil.isNotEmpty(productGroupId) ? Integer.valueOf(productGroupId) : null;
//招牌菜
List<TbProduct> tbProducts = tbProductMapper.selectIsSpecialty(Integer.valueOf(shopId));
concurrentMap.put("hots", handleDate(tbProducts,true,1,false));
List<TbProductGroup> groupList = tbProductGroupMapper.selectByShopId(shopId, id);
TbShopInfo shopInfo = mpShopInfoMapper.selectById(shopId);
concurrentMap.put("hots", handleDate(tbProducts,true,1,false, shopInfo));
List<TbProductGroup> groupList = tbProductGroupMapper.selectByShopId(shopId, id);
if (ObjectUtil.isNotEmpty(groupList) && groupList.size() > 0) {
//热销
TbProductGroup hot = new TbProductGroup();
hot.setName("热销");
List<TbProduct> hots = tbProductMapper.selectHot(shopId);
hot.setProducts(handleDate(hots,true,1,false));
hot.setProducts(handleDate(hots,true,1,false, shopInfo));
//商品
groupList.parallelStream().forEach(g -> {
if (g.getUseTime()==1) g.setIsSale(getIsSale(g.getSaleStartTime(),g.getSaleEndTime()));