Commit ea25f8a9 by 孙昱

sunyu::update::fix bug about NPE

parent 218d7b80
......@@ -2248,7 +2248,7 @@ public class ShoppingCartMCoffeeServiceImpl {
int seedCouponGoodsCount = 0;
for (CartGoods cartGoods : oldCartGoodsList) {
//1.种子券商品券信息与月卡信息一致
if (!addShoppingCartGoodsRequestVo.getCouponCode().equals(cartGoods.getMonthCardInfo().getCardCode())){
if (null != cartGoods.getMonthCardInfo() && !addShoppingCartGoodsRequestVo.getCouponCode().equals(cartGoods.getMonthCardInfo().getCardCode())){
throw new ServiceException(ResponseResult.SHOPPING_CART_COUPON_NOT_EXIST);
}
if (cartGoods.getIsMonthCard()>0){
......
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