Commit 159f4cba by chongfu.liang

Merge remote-tracking branch 'origin/master'

parents b065e277 21633612
......@@ -92,23 +92,29 @@ public class CalculationSharingEquallyService {
* 活动库存
* 过滤出加价购
*/
if (null != discountResult) {
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Discount> addMoneyDiscounts = discountResult.getDiscounts()
.stream()
.filter(discount -> ActivityTypeEnum.TYPE_81.getCode().equals(discount.getType()))
.collect(Collectors.toList());
if (null != discountResult) {
List<SubtractStockVO> stocks = filterSendGoodsStocks(discountResult.getStocks(), shoppingCartInfoRequestVo, addMoneyDiscounts);
if (CollectionUtils.isNotEmpty(stocks)) shoppingCartGoodsDto.setStocks(stocks);
}
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods> goods = discountResult.getGoods();
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods> goods = null;
if (discountResult !=null) {
goods = discountResult.getGoods();
}
/**
* 利用促销赋值totalDiscountAmount
*/
shoppingCartGoodsResponseVo.setProducts(cartGoodsList);
CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods find = null;
for (CartGoods product : shoppingCartGoodsResponseVo.getProducts()) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods find = goods.stream().filter((k) -> k.getCartGoodsUid().equals(product.getCartGoodsUid())).findFirst().get();
if (goods!=null) {
find = goods.stream().filter((k) -> k.getCartGoodsUid().equals(product.getCartGoodsUid())).findFirst().get();
}
ShoppingCartGoodsDto.CartGoodsDetailDto cartGoodsDetailDto = calculationCommonService.convertCartGoods2DetailGoodsList(find, product);
cartGoodsDetailDtoList.add(cartGoodsDetailDto);
}
......@@ -135,8 +141,9 @@ public class CalculationSharingEquallyService {
calculationCommonService.setAddAndUpdateResponse(cartGoodsList, shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo, ShoppingCartConstant.QUERY_INFO);
calculationCommonService.addNeedCardAmount(shoppingCartInfoRequestVo, shoppingCartGoodsResponseVo);
if (discountResult!=null && discountResult.getSendPointVo()!=null) {
shoppingCartGoodsDto.setSendPoint(discountResult.getSendPointVo());
}
shoppingCartGoodsDto.setDeliveryAmount(shoppingCartGoodsResponseVo.getDeliveryAmount());
shoppingCartGoodsDto.setDiscountDeliveryAmount(shoppingCartGoodsResponseVo.getDiscountDeliveryAmount());
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