Commit 483c8b0b by 姜海波

订单计算满额减配送费

parent 9884aa5a
......@@ -986,23 +986,23 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
BuyAndGiftsPromotionService buyAndGiftsPromotionService =(BuyAndGiftsPromotionService) PromotionFactory.getPromotionService(ShoppingCartPromotionEnum.BUY_GIFTS);
buyAndGiftsPromotionService.updateShoppingCartGoodsDiscount(couponPromotionVO, activityQueryDto, calculationDiscountResult, cartGoodsList, shoppingCartGoodsResponseVo, userLoginInfoDto, shoppingCartInfoRequestVo);
/**
* 满额减配送费
*/
if (calculationDiscountResult != null && CollectionUtils.isNotEmpty(calculationDiscountResult.getDiscounts())) {
ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount discount
= calculationDiscountResult.getDiscounts().stream()
.filter(discount1 -> { return discount1.getType().equals(ActivityTypeEnum.TYPE_14.getCode());})
.findFirst().get();
if (discount != null) {
shoppingCartGoodsResponseVo.setDeliveryAmount(calculationDiscountResult.getDeliveryAmount());
shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(calculationDiscountResult.getDistributionFee());
shoppingCartGoodsResponseVo.setThresholdAmount(discount.getThresholdAmount());
shoppingCartGoodsResponseVo.setIsDiscountDelivery(true);
}
}
// /**
// * 满额减配送费
// */
// if (calculationDiscountResult != null && CollectionUtils.isNotEmpty(calculationDiscountResult.getDiscounts())) {
//
// ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount discount
// = calculationDiscountResult.getDiscounts().stream()
// .filter(discount1 -> { return discount1.getType().equals(ActivityTypeEnum.TYPE_14.getCode());})
// .findFirst().get();
//
// if (discount != null) {
// shoppingCartGoodsResponseVo.setDeliveryAmount(calculationDiscountResult.getDeliveryAmount());
// shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(calculationDiscountResult.getDistributionFee());
// shoppingCartGoodsResponseVo.setThresholdAmount(discount.getThresholdAmount());
// shoppingCartGoodsResponseVo.setIsDiscountDelivery(true);
// }
// }
}
......
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