Commit 6f848887 by xiaoer.li@freemud.com

fixbug

parent 186cd288
...@@ -47,7 +47,7 @@ public class MaterialPromotionService implements IPromotionService { ...@@ -47,7 +47,7 @@ public class MaterialPromotionService implements IPromotionService {
if (map != null && !map.isEmpty()) { if (map != null && !map.isEmpty()) {
for (CartGoods cartGoods : cartGoodsList) { for (CartGoods cartGoods : cartGoodsList) {
//非正常商品 //非正常商品
if (CollectionUtils.isEmpty(cartGoods.getProductMaterialList()) || !cartGoods.getGoodsType().equals(GoodsTypeEnum.COMMON_GOODS)) if (CollectionUtils.isEmpty(cartGoods.getProductMaterialList()) || !cartGoods.getGoodsType().equals(GoodsTypeEnum.COMMON_GOODS.getGoodsType()))
continue; continue;
for (CartGoods.MaterialGoods materialGoods : cartGoods.getProductMaterialList()) { for (CartGoods.MaterialGoods materialGoods : cartGoods.getProductMaterialList()) {
MaterialApportion apportion = map.get(materialGoods.getSpuId()); MaterialApportion apportion = map.get(materialGoods.getSpuId());
...@@ -60,7 +60,7 @@ public class MaterialPromotionService implements IPromotionService { ...@@ -60,7 +60,7 @@ public class MaterialPromotionService implements IPromotionService {
long materialAmount = 0L, materialOriginal = 0L; long materialAmount = 0L, materialOriginal = 0L;
for (CartGoods cartGoods : cartGoodsList) { for (CartGoods cartGoods : cartGoodsList) {
if (CollectionUtils.isEmpty(cartGoods.getProductMaterialList()) || !cartGoods.getGoodsType().equals(GoodsTypeEnum.COMMON_GOODS)) if (CollectionUtils.isEmpty(cartGoods.getProductMaterialList()) || !cartGoods.getGoodsType().equals(GoodsTypeEnum.COMMON_GOODS.getGoodsType()))
continue; continue;
materialAmount = 0L; materialAmount = 0L;
materialOriginal = 0L; materialOriginal = 0L;
...@@ -89,7 +89,7 @@ public class MaterialPromotionService implements IPromotionService { ...@@ -89,7 +89,7 @@ public class MaterialPromotionService implements IPromotionService {
if (map == null && map.isEmpty()) return; if (map == null && map.isEmpty()) return;
List<ShoppingCartGoodsDto.CartGoodsDetailDto> products = shoppingCartGoodsDto.getProducts(); List<ShoppingCartGoodsDto.CartGoodsDetailDto> products = shoppingCartGoodsDto.getProducts();
for (ShoppingCartGoodsDto.CartGoodsDetailDto product : products) { for (ShoppingCartGoodsDto.CartGoodsDetailDto product : products) {
if (CollectionUtils.isEmpty(product.getMaterialList()) || !product.getProductType().equals(GoodsTypeEnum.COMMON_GOODS)) if (CollectionUtils.isEmpty(product.getMaterialList()) || !product.getProductType().equals(GoodsTypeEnum.COMMON_GOODS.getGoodsType()))
continue; continue;
for (ShoppingCartGoodsDto.CartGoodsDetailDto.MaterialGoods materialGoods : product.getMaterialList()) { for (ShoppingCartGoodsDto.CartGoodsDetailDto.MaterialGoods materialGoods : product.getMaterialList()) {
MaterialApportion material = map.get(materialGoods.getSpuId()); MaterialApportion material = map.get(materialGoods.getSpuId());
......
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