Commit 37c0fe31 by yu.sun

sunyu::fixbug::fix bug about productGroup price calculate

parent e91adf87
...@@ -408,13 +408,26 @@ public class CalculationServiceImpl { ...@@ -408,13 +408,26 @@ public class CalculationServiceImpl {
if("0".equals(materialGoods.getGoodsId())){ if("0".equals(materialGoods.getGoodsId())){
continue; continue;
} }
ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material material = new ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material(); ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material productGroup =
material.setType(2); new ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material();
material.setGoodsId(materialGoods.getGoodsId()); productGroup.setType(2);
material.setGoodsQuantity(materialGoods.getQty()); productGroup.setGoodsId(materialGoods.getGoodsId());
material.setOriginalPrice(null != materialGoods.getFinalPrice() ? productGroup.setGoodsQuantity(materialGoods.getQty());
productGroup.setOriginalPrice(null != materialGoods.getFinalPrice() ?
materialGoods.getFinalPrice() : 0); materialGoods.getFinalPrice() : 0);
materials.add(material); materials.add(productGroup);
if (CollectionUtils.isNotEmpty(materialGoods.getProductMaterialList())){
for (CartGoods.MaterialGoods goods : materialGoods.getProductMaterialList()) {
ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material material = new ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material();
material.setType(1);
material.setGoodsId(goods.getSpuId());
material.setGoodsQuantity(1);
material.setOriginalPrice(null != goods.getFinalPrice() ?
goods.getFinalPrice() : 0);
materials.add(material);
}
}
} }
} }
......
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