Commit 6faf45a4 by 刘鹏飞

新版促销增加小料数量入参

parent 8dd3328a
...@@ -444,5 +444,10 @@ public class CartGoods { ...@@ -444,5 +444,10 @@ public class CartGoods {
* 麦咖啡入机键位 * 麦咖啡入机键位
*/ */
private String customerCode; private String customerCode;
/**
* 数量
*/
private Integer qty;
} }
} }
...@@ -454,6 +454,7 @@ public class ShoppingCartConvertAdapter { ...@@ -454,6 +454,7 @@ public class ShoppingCartConvertAdapter {
for (MaterialRequestVo materialRequestVo : addShoppingCartGoodsRequestVo.getProductMaterialList()) { for (MaterialRequestVo materialRequestVo : addShoppingCartGoodsRequestVo.getProductMaterialList()) {
CartGoods.MaterialGoods materialGoods = new CartGoods.MaterialGoods(); CartGoods.MaterialGoods materialGoods = new CartGoods.MaterialGoods();
materialGoods.setSpuId(materialRequestVo.getSpuId()); materialGoods.setSpuId(materialRequestVo.getSpuId());
materialGoods.setQty(materialRequestVo.getQty() == null ? 1 : materialRequestVo.getQty());
materialGoodsList.add(materialGoods); materialGoodsList.add(materialGoods);
} }
} }
......
...@@ -267,6 +267,7 @@ public class CartGoods { ...@@ -267,6 +267,7 @@ public class CartGoods {
* 属性名 * 属性名
*/ */
private String attributeName; private String attributeName;
} }
@Data @Data
...@@ -569,5 +570,10 @@ public class CartGoods { ...@@ -569,5 +570,10 @@ public class CartGoods {
* 麦咖啡入机键位 * 麦咖啡入机键位
*/ */
private String customerCode; private String customerCode;
/**
* 数量
*/
private Integer qty;
} }
} }
...@@ -26,6 +26,11 @@ public class MaterialRequestVo { ...@@ -26,6 +26,11 @@ public class MaterialRequestVo {
private String groupId; private String groupId;
/** /**
* 数量
*/
private Integer qty;
/**
* 麦咖啡入机键位 * 麦咖啡入机键位
*/ */
private String customerCode; private String customerCode;
......
...@@ -253,7 +253,7 @@ public class CalculationSharingDiscountService { ...@@ -253,7 +253,7 @@ public class CalculationSharingDiscountService {
CalculationSharingDiscountRequestDto.CalculationDiscountGoods.Material material = new CalculationSharingDiscountRequestDto.CalculationDiscountGoods.Material(); CalculationSharingDiscountRequestDto.CalculationDiscountGoods.Material material = new CalculationSharingDiscountRequestDto.CalculationDiscountGoods.Material();
material.setType(1); material.setType(1);
material.setGoodsId(materialGoods.getSpuId()); material.setGoodsId(materialGoods.getSpuId());
material.setGoodsQuantity(1); material.setGoodsQuantity(materialGoods.getQty());
material.setOriginalPrice(materialGoods.getFinalPrice()); material.setOriginalPrice(materialGoods.getFinalPrice());
materials.add(material); materials.add(material);
} }
......
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