Commit ba8f87ef by xiaoer.li

对接促销算价Alpha->fix

parent 91003e3b
...@@ -74,8 +74,8 @@ public class CouponSharingService { ...@@ -74,8 +74,8 @@ public class CouponSharingService {
//List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.CouponResults> couponResultsList = calculationDiscountResult.getCouponDiscounts(); //List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.CouponResults> couponResultsList = calculationDiscountResult.getCouponDiscounts();
List<Integer> asList = Arrays.asList(3, 31); List<Integer> asList = Arrays.asList(3, 31);
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Discount> couponResultsList = calculationDiscountResult.getDiscounts(); List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Discount> couponResultsList = calculationDiscountResult.getDiscounts();
Optional<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Discount> first = couponResultsList.stream().filter(d -> asList.contains(d.getType())).findFirst(); CalculationSharingDiscountResponseDto.CalculationDiscountResult.Discount first = couponResultsList.stream().filter(d -> asList.contains(d.getType())).findFirst().orElse(null);
couponDiscount = first.get().getDiscount().longValue(); if (first!=null) couponDiscount = first.getDiscount().longValue();
} }
shoppingCartGoodsResponseVo.setCouponDiscount(couponDiscount); shoppingCartGoodsResponseVo.setCouponDiscount(couponDiscount);
//循环购物车商品券 //循环购物车商品券
......
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