Commit 542b5009 by 刘鹏飞

coco半价行小料半价显示判空

parent 7cb91139
......@@ -286,15 +286,19 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial> smallMaterial = goodsDiscountsMap.get(product.getCartGoodsUid()).getSmallMaterial();
Integer smallMaterialOriTotal = 0;
Long halfSmallMaterialOriTotal = 0L;
if(smallMaterial != null && !smallMaterial.isEmpty()){
for(CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.SmallMaterial sm : smallMaterial){
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount> smDiscounts = sm.getDiscounts();
if(smDiscounts != null && !smDiscounts.isEmpty()){
for(CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount smDiscount : smDiscounts){
if(ObjectUtils.equals(smDiscount.getType(),ActivityTypeEnum.TYPE_53.getCode())){
halfSmallMaterialOriTotal = halfSmallMaterialOriTotal + smDiscount.getSignleDiscount();
}
}
}
smallMaterialOriTotal = smallMaterialOriTotal + sm.getOriginalPrice();
}
}
// 商品的单价 = 商品单价+小料单价
Long originalPrice = (new Long(smallMaterialOriTotal) + product.getOriginalPrice());
......
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