Commit 62fa3477 by yu.sun

Merge branch 'feature/20201228_可用券信息查询NPE修复_yu.sun' into qa

parents f34baf40 48edeb2d
......@@ -475,6 +475,7 @@ public class CouponDiscountCalculation {
private Long createProductRequest(List<CartGoods> cartGoods, List<CouponProductVo> productList) {
Long totalAmount = 0L;
try {
for (CartGoods cartGood : cartGoods) {
// 剔除商品券得商品
if (StringUtils.isEmpty(cartGood.getSkuId()) && StringUtils.isEmpty(cartGood.getSpuId())) {
......@@ -502,6 +503,9 @@ public class CouponDiscountCalculation {
productList.add(product);
totalAmount = totalAmount +product.getAmount() * cartGood.getQty();
}
} catch (NumberFormatException e) {
throw new ServiceException(ResponseResult.SYSTEM_ERROR);
}
return totalAmount;
}
......
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