Commit 0336c80f by ping.wu

套餐中有单品组成的多规格,加料商品取值修改

parent db300e8d
......@@ -933,6 +933,28 @@ public class ShoppingCartConvertAdapter {
}
}
}
}else {
if(CollectionUtils.isNotEmpty(comboxGoodsSkuProductBean.getAdditionalGroupList())){
List<ProductTypeBeanDTO.ProductGroupType.GroupDetailType> groupDetail = new ArrayList<>();
for (ProductTypeBeanDTO.ProductGroupType productGroupType : comboxGoodsSkuProductBean.getAdditionalGroupList()){
groupDetail.addAll(productGroupType.getGroupDetail());
}
for (com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods productMaterial :comboxGoods.getProductMaterialList()){
for (ProductTypeBeanDTO.ProductGroupType.GroupDetailType groupDetailType : groupDetail){
if(groupDetailType.getProductId().equals(productMaterial.getSpuId())){
productMaterial.setSpuId(groupDetailType.getProductId());
productMaterial.setAmount(groupDetailType.getProductFinalPrice().longValue());
productMaterial.setFinalPrice(groupDetailType.getProductFinalPrice().longValue());
productMaterial.setOriginalAmount(groupDetailType.getProductFinalPrice().longValue());
productMaterial.setOriginalPrice(groupDetailType.getProductFinalPrice().longValue());
productMaterial.setSpuName(groupDetailType.getProductName());
}
}
}
}else {
//都不存在移除商品
comboxGoods.setProductMaterialList(new ArrayList<>());
}
}
}
}
......
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