Commit 21428b30 by huvchao@126.com

套餐商品保存商品组信息

parent c1dc318f
......@@ -209,27 +209,24 @@ public class ItemServiceImpl implements ItemService{
//第三方商品属性信息
comboProductsVo.setProductAttributeGroupList(productComboListDto.getProductAttributeGroupList());
System.out.println(productComboListDto.getProductId());
if(CollectionUtils.isNotEmpty(spuProductsVo.getProductGroupList())){
/** 商品组 */
for(ProductGroup group : spuProductsVo.getProductGroupList()){
if(CollectionUtils.isNotEmpty(group.getGroupDetail())){
for(GroupDetail detail : group.getGroupDetail()){
System.out.println(detail.getProductId());
if(detail.getProductId().equals(productComboListDto.getProductId())){
ProductGroup targetGroup = new ProductGroup();
targetGroup.setGroupCode(group.getGroupCode());
targetGroup.setName(group.getName());
targetGroup.setGroupDetail(Lists.newArrayList(detail));
List<ProductGroup> productGroupList = Lists.newArrayList(targetGroup);
comboProductsVo.setProductGroupList(productGroupList);
break;
}
}
}
}
}
resultMap.put(productComboListDto.getProductId(), comboProductsVo);
}
......
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