| | |
| | | if (coupon.getPrice() >= coupon.getLimitPrice()) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "优惠金额必须小于满额"); |
| | | } |
| | | if (coupon.getLimitPrice() < 1000) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "满减金额最低10元"); |
| | | } |
| | | if (coupon.getLimitPrice() - coupon.getPrice() < 1000) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "满减金额必须大于扣减金额10元以上"); |
| | | } |
| | | if (Objects.isNull(coupon.getPushDays()) || coupon.getPushDays() < 1) { |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "推送后领取有效天数必须大于等于1天"); |
| | | } |