Commit 37c0fe31 by yu.sun

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

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