Commit 63eb3d4d by 姜海波

Merge branch 'feature-2020/2/10-1.9.15-免配送费二期-海波' into qa

# Conflicts:
#	order-management/pom.xml
parent 36e664b4
...@@ -991,15 +991,15 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -991,15 +991,15 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
*/ */
if (calculationDiscountResult != null && CollectionUtils.isNotEmpty(calculationDiscountResult.getDiscounts())) { if (calculationDiscountResult != null && CollectionUtils.isNotEmpty(calculationDiscountResult.getDiscounts())) {
ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount discount Optional<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();
if (discount != null) { if (discount.isPresent()) {
shoppingCartGoodsResponseVo.setDeliveryAmount(calculationDiscountResult.getDeliveryAmount()); shoppingCartGoodsResponseVo.setDeliveryAmount(calculationDiscountResult.getDeliveryAmount());
shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(calculationDiscountResult.getDistributionFee()); shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(calculationDiscountResult.getDistributionFee());
shoppingCartGoodsResponseVo.setThresholdAmount(discount.getThresholdAmount()); shoppingCartGoodsResponseVo.setThresholdAmount(discount.get().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