Commit 9bd3e682 by 刘鹏飞

加点日志

parent c2162808
......@@ -71,12 +71,13 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
}
oneGoodsDiscounts.forEach(discount -> {
if(Objects.equals(discount.getType(),ActivityTypeEnum.TYPE_53.getCode())){
goodsDiscountsMap.put(goodsDiscount.getCartGoodsUid() + discount.getGoodsId(),discount);
goodsDiscountsMap.put(goodsDiscount.getCartGoodsUid() + "-" + discount.getGoodsId(),discount);
}
});
});
ApiLog.info("第二件半价,goodsDiscountsMap,",goodsDiscountsMap);
List<CartGoods> newProducts = new ArrayList<>();
List<CartGoods> products = shoppingCartGoodsResponseVo.getProducts();
......@@ -84,13 +85,13 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
if(products == null || products.isEmpty()){
return;
}
ApiLog.info("第二件半价,products,",products);
products.forEach(product -> {
Integer num = 0;
// 商品优惠的金额
Long discountAmount = 0L;
if(goodsDiscountsMap.get(product.getCartGoodsUid() + product.getGoodsId()) != null){
CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount discount = goodsDiscountsMap.get(product.getCartGoodsUid() + product.getGoodsId());
if(goodsDiscountsMap.get(product.getCartGoodsUid() + "-" + product.getGoodsId()) != null){
CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount discount = goodsDiscountsMap.get(product.getCartGoodsUid() + "-" + product.getGoodsId());
if(discount == null){
return;
}
......
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