Commit d5b5a554 by 孙昱

Merge branch 'feature/20201210_可选商品加料需求_yu.sun' into qa

parents db89b3da fa1caca6
......@@ -721,12 +721,26 @@ public class ShoppingCartConvertAdapter {
comboxGoods.setTaxId(isComboxGoods ? (StringUtils.isNotEmpty(productComboType.getTaxId()) ? productComboType.getTaxId() : "") :
(StringUtils.isNotEmpty(groupDetailType.getTaxId()) ? groupDetailType.getTaxId() : ""));
// TODO: 2020/10/22 套餐内可选商品加料,暂无
//2020/12/10 套餐内可选商品加料
if(CollectionUtils.isNotEmpty(comboxGoods.getProductMaterialList())){
List<com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods> productMaterialList = new ArrayList<>();
com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods materialGoods = new com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods();
productMaterialList.add(materialGoods);
comboxGoods.setProductMaterialList(productMaterialList);
if (CollectionUtils.isNotEmpty(parentProductBean.getAdditionalGroupList())) {
List<ProductBeanDTO.ProductGroupType.GroupDetailType> groupDetail = new ArrayList<>();
for (ProductBeanDTO.ProductGroupType productGroupType : parentProductBean.getAdditionalGroupList()){
groupDetail.addAll(productGroupType.getGroupDetail());
}
for (com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods productMaterial :comboxGoods.getProductMaterialList()){
for (ProductBeanDTO.ProductGroupType.GroupDetailType detailType : groupDetail){
if(detailType.getProductId().equals(productMaterial.getSpuId())){
productMaterial.setSpuId(detailType.getProductId());
productMaterial.setAmount(detailType.getProductFinalPrice().longValue());
productMaterial.setFinalPrice(detailType.getProductFinalPrice().longValue());
productMaterial.setOriginalAmount(detailType.getProductFinalPrice().longValue());
productMaterial.setOriginalPrice(detailType.getProductFinalPrice().longValue());
productMaterial.setSpuName(detailType.getProductName());
}
}
}
}
}
}
......
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