Commit 5b116545 by ping.wu

加料商品键位修改

parent 6339f1a9
...@@ -921,16 +921,15 @@ public class ShoppingCartConvertAdapter { ...@@ -921,16 +921,15 @@ public class ShoppingCartConvertAdapter {
List<com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods> productMaterialList = new ArrayList<>(); List<com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods> productMaterialList = new ArrayList<>();
for (com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods productMaterial :comboxGoods.getProductMaterialList()){ for (com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods productMaterial :comboxGoods.getProductMaterialList()){
for (ProductBeanDTO.ProductGroupType.GroupDetailType groupDetailType : groupDetail){ for (ProductBeanDTO.ProductGroupType.GroupDetailType groupDetailType : groupDetail){
if(groupDetailType.getProductId().equals(productMaterial.getSpuId())){ if(groupDetailType.getProductId().equals(productMaterial.getSpuId()) && productMaterial.getAmount() == null){
com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods materialGoods = new com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods(); productMaterial.setSpuId(groupDetailType.getProductId());
materialGoods.setSpuId(groupDetailType.getProductId()); productMaterial.setAmount(groupDetailType.getProductPrice().longValue());
materialGoods.setAmount(groupDetailType.getProductPrice().longValue()); productMaterial.setFinalPrice(groupDetailType.getProductFinalPrice().longValue());
materialGoods.setFinalPrice(groupDetailType.getProductFinalPrice().longValue()); productMaterial.setOriginalAmount(groupDetailType.getProductPrice().longValue());
materialGoods.setOriginalAmount(groupDetailType.getProductPrice().longValue()); productMaterial.setOriginalPrice(groupDetailType.getProductPrice().longValue());
materialGoods.setOriginalPrice(groupDetailType.getProductPrice().longValue()); productMaterial.setSpuName(groupDetailType.getProductName());
materialGoods.setSpuName(groupDetailType.getProductName()); productMaterial.setKeyWord(productMaterial.getKeyWord());
materialGoods.setKeyWord(productMaterial.getKeyWord()); productMaterialList.add(productMaterial);
productMaterialList.add(materialGoods);
} }
} }
} }
......
...@@ -242,7 +242,7 @@ public class ActivityCalculationDiscountResponseDto { ...@@ -242,7 +242,7 @@ public class ActivityCalculationDiscountResponseDto {
} }
@Data @Data
public class GoodsMaterial{ public static class GoodsMaterial{
/** /**
* 子商品类型:1-小料;2-可选商品 * 子商品类型:1-小料;2-可选商品
*/ */
......
...@@ -376,6 +376,9 @@ public class CartGoods { ...@@ -376,6 +376,9 @@ public class CartGoods {
if (CollectionUtils.isNotEmpty(goods.getSpecialExtra())) { if (CollectionUtils.isNotEmpty(goods.getSpecialExtra())) {
goods.getSpecialExtra().stream().sorted(Comparator.comparing(SpecialExtra::getAttributeId)).forEach(e -> originalString.append(e.getAttributeId())); goods.getSpecialExtra().stream().sorted(Comparator.comparing(SpecialExtra::getAttributeId)).forEach(e -> originalString.append(e.getAttributeId()));
} }
if (CollectionUtils.isNotEmpty(goods.getProductMaterialList())) {
goods.getProductMaterialList().stream().sorted(Comparator.comparing(MaterialGoods::getSpuId)).forEach(e -> originalString.append(e.getSpuId()));
}
} }
} }
if (CollectionUtils.isNotEmpty(productGroupList)) { if (CollectionUtils.isNotEmpty(productGroupList)) {
...@@ -404,6 +407,9 @@ public class CartGoods { ...@@ -404,6 +407,9 @@ public class CartGoods {
if (CollectionUtils.isNotEmpty(goods.getSpecialExtra())) { if (CollectionUtils.isNotEmpty(goods.getSpecialExtra())) {
goods.getSpecialExtra().stream().sorted(Comparator.comparing(SpecialExtra::getAttributeId)).forEach(e -> currentString.append(e.getAttributeId())); goods.getSpecialExtra().stream().sorted(Comparator.comparing(SpecialExtra::getAttributeId)).forEach(e -> currentString.append(e.getAttributeId()));
} }
if (CollectionUtils.isNotEmpty(goods.getProductMaterialList())) {
goods.getProductMaterialList().stream().sorted(Comparator.comparing(MaterialGoods::getSpuId)).forEach(e -> currentString.append(e.getSpuId()));
}
} }
} }
if (CollectionUtils.isNotEmpty(cartGoods.getProductGroupList())) { if (CollectionUtils.isNotEmpty(cartGoods.getProductGroupList())) {
......
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