Commit 9d022a57 by chongfu.liang

fix

parent 19745710
......@@ -1736,7 +1736,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
String spqId = spuId.substring(CommonsConstant.COUPON_PREFIX.length());
if (CollectionUtils.isNotEmpty(allCartGoodsList) && !isMultiCoupon){
CartGoods sameCartGoods = allCartGoodsList.stream().filter(p -> p.getSpuId().equals(spqId)).findFirst().orElse(null);
if (sameCartGoods.getQty() > 0){
if (sameCartGoods != null && sameCartGoods.getQty() != null && sameCartGoods.getQty() > 0){
throw new ServiceException(ResponseResult.SHOPPING_CART_GOODS_COUPON_CAN_NOT_USE);
}
}
......
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