MrShi
7 小时以前 59bfd0b8bbbf0ee94ec68e4a3a1a6e536d0ad8fd
server/services/src/main/java/com/doumee/service/business/impl/CouponServiceImpl.java
@@ -164,6 +164,12 @@
        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天");
        }