Commit ba905d33 by 刘鹏飞

coco商品原单价=商品现单价+小料现单价

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