Commit 5d60c9db by 查志伟

买一赠一时,赠品属性和原商品保持一致

parent 13a08f40
......@@ -118,7 +118,7 @@ public class PlatformActiveServiceImpl implements ActiveService {
cartGood.setClassificationName(product.getCategoryName());
// nodeId标识activeCode,用于计算均摊时每个商品在每个活动上均摊金额
cartGood.setNodeId(discount.getActivityCode());
list.addAll(buyAndGiftsPromotionService.setGiftExtra(cartGood, product, addcartGoodsList));
list.addAll(buyAndGiftsPromotionService.setGiftExtra(cartGood, product, oldcartGoodsLists));
}
// 因为有涉及到用户选择的属性,存入redis
addcartGoodsList.addAll(giftCacheManager.resetGiftCache(list, null, partnerId, storeId, userId));
......
......@@ -218,7 +218,7 @@ public class BuyAndGiftsPromotionService implements IPromotionService {
List<CartGoods> result = new ArrayList<>();
result.add(cartGoods);
//购物车内存在同类
// 买一赠一时,赠品属性和原商品保持一致
if (null != cartGoodsList && cartGoodsList.stream().filter(c -> c.getSpuId().equals(cartGoods.getSpuId())).count() > 0) {
CartGoods find = cartGoodsList.stream().filter(c -> c.getCartGoodsUid().equals(cartGoods.getOriginalGoodsUid())).findFirst().orElse(null);
if (null == find) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment