|
|
@@ -538,8 +538,6 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
List<GoodsShop> records = goodsShopIPage.getRecords();
|
|
|
|
|
|
if (CollUtil.isNotEmpty(records)) {
|
|
|
- CommonInfo one1 = commonInfoService.findOne(292);
|
|
|
- CommonInfo one2 = commonInfoService.findOne(293);
|
|
|
List<Long> shopIdList = records.stream().map(GoodsShop::getShopId).collect(Collectors.toList());
|
|
|
List<Goods> goodsList = goodsDao.selectGoodsBySalesAndGoodsNameAndShopIds(shopIdList, queryDTO.getImpotr());
|
|
|
Map<Long, List<Goods>> goodsMap = goodsList.stream().collect(Collectors.groupingBy(Goods::getShopId));
|
|
|
@@ -551,13 +549,27 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
List<ShopActivityVO> shopActivityVOS = activityShopService.getActivityByShopIds(shopIdList);
|
|
|
Map<Long, List<ShopActivityVO>> shopActivityMap = shopActivityVOS.stream().collect(Collectors.groupingBy(ShopActivityVO::getShopId));
|
|
|
|
|
|
+ CommonInfo vipPromotionMinAmount = commonInfoService.findOne(446);
|
|
|
+ CommonInfo vipPromotionAmount = commonInfoService.findOne(444);
|
|
|
+ String vipPromotionDesc = "满" + vipPromotionMinAmount.getMin() + "元减" + vipPromotionAmount.getMin() + "元";
|
|
|
+
|
|
|
+ CommonInfo one1 = commonInfoService.findOne(292);
|
|
|
+ CommonInfo one2 = commonInfoService.findOne(293);
|
|
|
for (int a = 0; a < goodsShopIPage.getRecords().size(); a++) {
|
|
|
GoodsShop goodsShop = goodsShopIPage.getRecords().get(a);
|
|
|
Long shopId = goodsShop.getShopId();
|
|
|
goodsShop.setCouponList(couponMap.get(shopId));
|
|
|
|
|
|
- // 设置活动信息
|
|
|
- goodsShop.setShopActivityList(shopActivityMap.get(shopId));
|
|
|
+ // 会员专区查询
|
|
|
+ if (StrUtil.equals(queryDTO.getVipPromotion(), goodsShop.getVipPromotion())) {
|
|
|
+ // 设置会员优惠描述
|
|
|
+ goodsShop.setVipPromotionDesc(vipPromotionDesc);
|
|
|
+ }
|
|
|
+ // 非会员专区查询
|
|
|
+ else {
|
|
|
+ // 设置活动信息
|
|
|
+ goodsShop.setShopActivityList(shopActivityMap.get(shopId));
|
|
|
+ }
|
|
|
|
|
|
if (StringUtils.isNotEmpty(queryDTO.getImpotr())) {
|
|
|
goodsShop.setGoodsList(goodsMap.get(shopId));
|