空值判断
This commit is contained in:
@@ -62,7 +62,7 @@ public class PointsGoodPayServiceImpl implements PointsGoodPayService {
|
||||
.eq(MkPointsGoodsRecord::getPointsGoodsId, param.getPointsGoodsId())
|
||||
.ne(MkPointsGoodsRecord::getStatus, "已退款")
|
||||
.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() + "件");
|
||||
}
|
||||
MkPointsUser pointsUser = pointsUserService.getPointsUser(param.getShopId(), null, param.getUserId());
|
||||
@@ -161,7 +161,7 @@ public class PointsGoodPayServiceImpl implements PointsGoodPayService {
|
||||
.setSource("积分兑换");
|
||||
couponRecordService.receiveCoupon(giftDTO, record.getNumber(), false);
|
||||
return record;
|
||||
}else {
|
||||
} else {
|
||||
record.setStatus("待核销");
|
||||
record.setCouponCode(RandomUtil.randomNumbers(12));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user