Commit e39bd6a1 by huiyang.chen

fix bug

parent c17546b4
...@@ -181,8 +181,12 @@ public class CalculationServiceImpl { ...@@ -181,8 +181,12 @@ public class CalculationServiceImpl {
shoppingCartGoodsDto.setTotalDiscountAmount(shoppingCartGoodsResponseVo.getTotalDiscountAmount()); shoppingCartGoodsDto.setTotalDiscountAmount(shoppingCartGoodsResponseVo.getTotalDiscountAmount());
//随单购 月卡价格 //随单购 月卡价格
shoppingCartGoodsDto.setPayCardFee(shoppingCartGoodsResponseVo.getPayCardFee()); shoppingCartGoodsDto.setPayCardFee(shoppingCartGoodsResponseVo.getPayCardFee());
long buyThreeGiveOneCouponFee = calculationDiscountResult == null ? 0l : calculationDiscountResult.getDiscounts().stream().filter(t -> t.getExtendType() == 7).mapToLong(apportionGoods -> apportionGoods.getCardAmount()).sum(); if (calculationDiscountResult != null ) {
shoppingCartGoodsDto.setBuyThreeGiveOneCouponFee(buyThreeGiveOneCouponFee); if (CollectionUtils.isNotEmpty(calculationDiscountResult.getDiscounts())) {
long buyThreeGiveOneCouponFee = calculationDiscountResult.getDiscounts().stream().filter(t -> t.getExtendType() == 7).mapToLong(apportionGoods -> apportionGoods.getCardAmount()).sum();
shoppingCartGoodsDto.setBuyThreeGiveOneCouponFee(buyThreeGiveOneCouponFee);
}
}
shoppingCartGoodsDto.setDeliveryAmount(shoppingCartGoodsResponseVo.getDeliveryAmount()); shoppingCartGoodsDto.setDeliveryAmount(shoppingCartGoodsResponseVo.getDeliveryAmount());
shoppingCartGoodsDto.setDiscountDeliveryAmount(shoppingCartGoodsResponseVo.getDiscountDeliveryAmount()); shoppingCartGoodsDto.setDiscountDeliveryAmount(shoppingCartGoodsResponseVo.getDiscountDeliveryAmount());
shoppingCartGoodsDto.setThresholdAmount(shoppingCartGoodsResponseVo.getThresholdAmount()); shoppingCartGoodsDto.setThresholdAmount(shoppingCartGoodsResponseVo.getThresholdAmount());
......
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