Commit 5cd68be8 by chongfu.liang

Merge branch 'feature/20201204-1.0.10-加赠商品修改由行记录判断-lcf' into qa

parents 0555cd9d 36c1fb8e
...@@ -346,6 +346,10 @@ public class ActivityCalculationDiscountResponseDto { ...@@ -346,6 +346,10 @@ public class ActivityCalculationDiscountResponseDto {
@Data @Data
public static class SendGoods { public static class SendGoods {
/** /**
* 买一赠一时,存赠送主商品的cartGoodsUid 用于标记是那个商品送的
*/
private String originalGoodsUid;
/**
* 赠送商品ID * 赠送商品ID
*/ */
private String goodsId; private String goodsId;
......
...@@ -237,13 +237,12 @@ public class BuySendPromotionService implements IPromotionService { ...@@ -237,13 +237,12 @@ public class BuySendPromotionService implements IPromotionService {
} }
if (manyOrSingle) { if (manyOrSingle) {
// 多规格 // 多规格
if (!Objects.equals(sendGoodsMap.get(cartGood.getSkuId()).getGoodsId(), cartGood.getSkuId())) { if (!Objects.equals(sendGoodsMap.get(cartGood.getSkuId()).getOriginalGoodsUid(), cartGood.getCartGoodsUid())) {
return; return;
} }
} else { } else {
// 单品 // 单品
List<String> spuIds = newCartGoodsList.stream().map(CartGoods::getSpuId).collect(Collectors.toList()); if (!Objects.equals(sendGoodsMap.get(cartGood.getSpuId()).getOriginalGoodsUid(), cartGood.getCartGoodsUid())) {
if (spuIds.contains(cartGood.getSpuId())) {
return; return;
} }
} }
......
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