Commit fe9dd566 by 刘鹏飞

Merge remote-tracking branch 'remotes/origin/feature/coco-payGift-刘鹏飞' into qa

parents 7b87bd0e ba905d33
...@@ -266,6 +266,11 @@ public class CalculationSharingDiscountResponseDto { ...@@ -266,6 +266,11 @@ public class CalculationSharingDiscountResponseDto {
* 当前活动实际优惠的商品数量 * 当前活动实际优惠的商品数量
*/ */
private Integer actualGoodsNumber; private Integer actualGoodsNumber;
/**
* 优惠现单价
*/
private Long signleDiscount;
} }
/** /**
......
...@@ -242,13 +242,14 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation ...@@ -242,13 +242,14 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
continue; continue;
} }
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial> smallMaterial = goodsDiscountsMap.get(product.getCartGoodsUid()).getSmallMaterial(); List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial> smallMaterial = goodsDiscountsMap.get(product.getCartGoodsUid()).getSmallMaterial();
Integer smallMaterialTotal = 0; Integer smallMaterialOriTotal = 0;
for(CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial sm : smallMaterial){ for(CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial sm : smallMaterial){
smallMaterialTotal = smallMaterialTotal + sm.getOriginalPrice(); smallMaterialOriTotal = smallMaterialOriTotal + sm.getOriginalPrice();
} }
// 商品的单价 = 商品单价+小料单价 // 商品的单价 = 商品单价+小料单价
product.setOriginalPrice(new Long(smallMaterialTotal)); product.setOriginalPrice(new Long(smallMaterialOriTotal) + product.getOriginalPrice());
product.setFinalPrice(new Long(smallMaterialOriTotal) + product.getFinalPrice());
newProducts.add(product); newProducts.add(product);
} }
...@@ -332,15 +333,15 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation ...@@ -332,15 +333,15 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
continue; continue;
} }
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial> smallMaterial = goodsDiscountsMap.get(product.getCartGoodsUid()).getSmallMaterial(); List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial> smallMaterial = goodsDiscountsMap.get(product.getCartGoodsUid()).getSmallMaterial();
Integer smallMaterialTotal = 0; Integer smallMaterialOriTotal = 0;
for(CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial sm : smallMaterial){ for(CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial sm : smallMaterial){
smallMaterialTotal = smallMaterialTotal + sm.getOriginalPrice(); smallMaterialOriTotal = smallMaterialOriTotal + sm.getOriginalPrice();
} }
// 商品的单价 = 商品单价+小料单价 // 商品的单价 = 商品单价+小料单价
product.setOriginalPrice(new Long(smallMaterialTotal)); product.setOriginalPrice(new Long(smallMaterialOriTotal) + product.getOriginalPrice());
// 商品现单价=商品现单价+小料现单价 // 商品现单价 = 商品现单价+小料现单价
//product.setFinalPrice(); product.setFinalPrice(new Long(smallMaterialOriTotal) + product.getFinalPrice());
newProducts.add(product); newProducts.add(product);
} }
......
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