Commit 36338125 by ping.wu

套餐可选商品空键位

parent 8a745e29
...@@ -533,6 +533,9 @@ public class ShoppingCartConvertAdapter { ...@@ -533,6 +533,9 @@ public class ShoppingCartConvertAdapter {
List<ValidateSkuProductType> result = new ArrayList<>(); List<ValidateSkuProductType> result = new ArrayList<>();
if (CollectionUtils.isNotEmpty(productComboList)) { if (CollectionUtils.isNotEmpty(productComboList)) {
for (com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.ComboxGoods comboxGoods : productComboList) { for (com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.ComboxGoods comboxGoods : productComboList) {
if("0".equals(comboxGoods.getGoodsId())){
continue;
}
ValidateSkuProductType validateSkuProductType = new ValidateSkuProductType(); ValidateSkuProductType validateSkuProductType = new ValidateSkuProductType();
validateSkuProductType.setProductId(StringUtils.isNotEmpty(comboxGoods.getSpuId()) ? comboxGoods.getSpuId() : comboxGoods.getSkuId()); validateSkuProductType.setProductId(StringUtils.isNotEmpty(comboxGoods.getSpuId()) ? comboxGoods.getSpuId() : comboxGoods.getSkuId());
validateSkuProductType.setSkuId(comboxGoods.getSkuId()); validateSkuProductType.setSkuId(comboxGoods.getSkuId());
...@@ -659,7 +662,9 @@ public class ShoppingCartConvertAdapter { ...@@ -659,7 +662,9 @@ public class ShoppingCartConvertAdapter {
* @return * @return
*/ */
private void updateComboxGoodsInfoForMCoffee(com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.ComboxGoods comboxGoods, ProductBeanDTO parentProductBean, boolean isComboxGoods) { private void updateComboxGoodsInfoForMCoffee(com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.ComboxGoods comboxGoods, ProductBeanDTO parentProductBean, boolean isComboxGoods) {
if("0".equals(comboxGoods.getGoodsId())){
return;
}
ProductBeanDTO.ProductComboType productComboType = new ProductBeanDTO.ProductComboType(); ProductBeanDTO.ProductComboType productComboType = new ProductBeanDTO.ProductComboType();
ProductBeanDTO.ProductGroupType.GroupDetailType groupDetailType = new ProductBeanDTO.ProductGroupType.GroupDetailType(); ProductBeanDTO.ProductGroupType.GroupDetailType groupDetailType = new ProductBeanDTO.ProductGroupType.GroupDetailType();
if (isComboxGoods) { if (isComboxGoods) {
......
...@@ -30,6 +30,11 @@ public class ComboxGoodsRequestVo { ...@@ -30,6 +30,11 @@ public class ComboxGoodsRequestVo {
* 商品组Id * 商品组Id
*/ */
private String productGroupId; private String productGroupId;
/**
* 麦咖啡空键位
*/
private String emptyKey;
/** /**
* 商品额外的属性 * 商品额外的属性
*/ */
......
...@@ -1037,6 +1037,20 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -1037,6 +1037,20 @@ public class ShoppingCartMCoffeeServiceImpl {
productCombox.setExtra(vo.getExtra()); productCombox.setExtra(vo.getExtra());
productCombox.setSpecialExtra(vo.getSpecialExtra()); productCombox.setSpecialExtra(vo.getSpecialExtra());
productCombox.setProductGroupId(StringUtils.isEmpty(vo.getProductGroupId()) ? null : Long.parseLong(vo.getProductGroupId())); productCombox.setProductGroupId(StringUtils.isEmpty(vo.getProductGroupId()) ? null : Long.parseLong(vo.getProductGroupId()));
if(StringUtils.isNotEmpty(vo.getEmptyKey())){
productCombox.setGoodsId("0");
productCombox.setSkuId("0");
productCombox.setSpuId("0");
productCombox.setCustomerCode(vo.getEmptyKey());
productCombox.setName("无");
productCombox.setSpuName("无");
productCombox.setSkuName("无");
productCombox.setFinalPrice(0L);
productCombox.setOriginalPrice(0L);
productCombox.setOriginalAmount(0L);
productCombox.setAmount(0L);
productCombox.setQty(1);
}
//加料商品集 //加料商品集
if (CollectionUtils.isNotEmpty(vo.getProductMaterialList())) { if (CollectionUtils.isNotEmpty(vo.getProductMaterialList())) {
List<CartGoods.MaterialGoods> comboxMaterialGoodsList = new ArrayList<>(); List<CartGoods.MaterialGoods> comboxMaterialGoodsList = new ArrayList<>();
......
...@@ -376,6 +376,9 @@ public class CalculationServiceImpl { ...@@ -376,6 +376,9 @@ public class CalculationServiceImpl {
//可选搭配 //可选搭配
if (cartGoods != null && CollectionUtils.isNotEmpty(cartGoods.getProductGroupList())) { if (cartGoods != null && CollectionUtils.isNotEmpty(cartGoods.getProductGroupList())) {
for (CartGoods.ComboxGoods materialGoods : cartGoods.getProductGroupList()) { for (CartGoods.ComboxGoods materialGoods : cartGoods.getProductGroupList()) {
if("0".equals(materialGoods.getGoodsId())){
continue;
}
ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material material = new ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material(); ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material material = new ActivityCalculationDiscountRequestDto.CalculationDiscountGoods.Material();
material.setType(2); material.setType(2);
material.setGoodsId(materialGoods.getGoodsId()); material.setGoodsId(materialGoods.getGoodsId());
......
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