空值判断

This commit is contained in:
2025-12-10 17:54:19 +08:00
parent adea09b0fe
commit 2362de5600

View File

@@ -62,7 +62,7 @@ public class PointsGoodPayServiceImpl implements PointsGoodPayService {
.eq(MkPointsGoodsRecord::getPointsGoodsId, param.getPointsGoodsId()) .eq(MkPointsGoodsRecord::getPointsGoodsId, param.getPointsGoodsId())
.ne(MkPointsGoodsRecord::getStatus, "已退款") .ne(MkPointsGoodsRecord::getStatus, "已退款")
.eq(MkPointsGoodsRecord::getUserId, param.getUserId()), Integer.class); .eq(MkPointsGoodsRecord::getUserId, param.getUserId()), Integer.class);
if (goods.getLimitQuota() > 0 && boughtCount != null && boughtCount >= goods.getLimitQuota()) { if (goods.getLimitQuota() != null && goods.getLimitQuota() > 0 && boughtCount != null && boughtCount >= goods.getLimitQuota()) {
throw new CzgException("兑换失败,该商品每人限制兑换" + goods.getLimitQuota() + ""); throw new CzgException("兑换失败,该商品每人限制兑换" + goods.getLimitQuota() + "");
} }
MkPointsUser pointsUser = pointsUserService.getPointsUser(param.getShopId(), null, param.getUserId()); MkPointsUser pointsUser = pointsUserService.getPointsUser(param.getShopId(), null, param.getUserId());