Commit e91adf87 by yu.sun

sunyu::update::update about productGroup add Mateial about price calculate

parent f8a4cd08
......@@ -793,7 +793,6 @@ public class ShoppingCartConvertAdapter {
List<com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods> productMaterialList = new ArrayList<>();
Long materialAmount = 0L;
Long originalMaterAmount = 0L;
if (CollectionUtils.isNotEmpty(materialList)){
for (ProductTypeBeanDTO.ProductGroupType.GroupDetailType detailType : materialList) {
com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods materialGoods = new com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods();
......@@ -807,8 +806,6 @@ public class ShoppingCartConvertAdapter {
productMaterialList.add(materialGoods);
materialAmount += detailType.getProductFinalPrice().longValue() * comboxGoods.getQty();
originalMaterAmount += detailType.getProductFinalPrice().longValue() * comboxGoods.getQty();
}
}
comboxGoods.setMaterialAmount(materialAmount);
......@@ -961,6 +958,7 @@ public class ShoppingCartConvertAdapter {
cartGoods.getProductGroupList().stream().mapToLong(group -> (null != group.getMaterialAmount() ? group.getMaterialAmount() : 0)).sum();
cartGoods.setOriginalMaterialAmount(materialAmount);
cartGoods.setMaterialAmount(materialAmount);
cartGoods.setOriginalAmount(cartGoods.getOriginalPrice()*cartGoods.getQty() + materialAmount);
}
}
//更新当前商品行价格
......@@ -1135,7 +1133,7 @@ public class ShoppingCartConvertAdapter {
;
materialSubName = materialSubName + "/" + detail.getProductName();
}
//设置购物车行记录
//设置购物车行加料列表
cartGoods.setProductMaterialList(materialGoodsList);
//加料行记录现价总价
cartGoods.setMaterialAmount(materialAmount);
......
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