|
|
@@ -230,9 +230,17 @@ public class CouponCommonServiceImpl implements CouponCommonService {
|
|
|
throw BusinessRuntimeException.getInstance("请输入正确的有效起始和截止时间");
|
|
|
}
|
|
|
} else {
|
|
|
- if (coupon.getValidDays() == null || coupon.getValidDays() < 0) {
|
|
|
+ if (coupon.getValidDays() == null && coupon.getValidHours() == null) {
|
|
|
+ throw BusinessRuntimeException.getInstance("请选择对应领取后有效时间");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (coupon.getValidDays() != null || coupon.getValidDays() < 0) {
|
|
|
throw BusinessRuntimeException.getInstance("请输入正确的有效天数");
|
|
|
}
|
|
|
+
|
|
|
+ if (coupon.getValidHours() != null || coupon.getValidHours() < 0) {
|
|
|
+ throw BusinessRuntimeException.getInstance("请输入正确的有效小时");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (StrUtil.isNotEmpty(coupon.getExCode())) {
|