Commit 483c8b0b by 姜海波

订单计算满额减配送费

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