Commit 21428b30 by huvchao@126.com

套餐商品保存商品组信息

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