|
@@ -97,14 +97,6 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
|
|
|
if (barPerformance.getSingleEndDatetime() == null) {
|
|
if (barPerformance.getSingleEndDatetime() == null) {
|
|
|
throw new IllegalArgumentException("单次演出必须填写结束时间");
|
|
throw new IllegalArgumentException("单次演出必须填写结束时间");
|
|
|
}
|
|
}
|
|
|
- // 验证开始时间必须是今天或以后
|
|
|
|
|
- if (barPerformance.getSingleStartDatetime().before(todayStart)) {
|
|
|
|
|
- throw new IllegalArgumentException("开始时间必须是今天或以后");
|
|
|
|
|
- }
|
|
|
|
|
- // 确保开始时间早于结束时间
|
|
|
|
|
- if (barPerformance.getSingleStartDatetime().after(barPerformance.getSingleEndDatetime())) {
|
|
|
|
|
- throw new IllegalArgumentException("开始时间不能晚于结束时间");
|
|
|
|
|
- }
|
|
|
|
|
// 单次演出不需要周天数据,清除周天字段(设置为空字符串,确保数据库插入时包含该字段)
|
|
// 单次演出不需要周天数据,清除周天字段(设置为空字符串,确保数据库插入时包含该字段)
|
|
|
barPerformance.setPerformanceWeek("");
|
|
barPerformance.setPerformanceWeek("");
|
|
|
break;
|
|
break;
|
|
@@ -130,10 +122,6 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
|
|
|
if (barPerformance.getSingleEndDatetime() == null) {
|
|
if (barPerformance.getSingleEndDatetime() == null) {
|
|
|
throw new IllegalArgumentException("每天定时演出必须填写结束时间");
|
|
throw new IllegalArgumentException("每天定时演出必须填写结束时间");
|
|
|
}
|
|
}
|
|
|
- // 验证时间逻辑:开始时间必须早于结束时间(只比较时间部分,忽略日期部分)
|
|
|
|
|
- if (!isTimeBefore(barPerformance.getSingleStartDatetime(), barPerformance.getSingleEndDatetime())) {
|
|
|
|
|
- throw new IllegalArgumentException("开始时间必须早于结束时间");
|
|
|
|
|
- }
|
|
|
|
|
// 每天定时不需要周天数据,清除周天字段(设置为空字符串,确保数据库插入时包含该字段)
|
|
// 每天定时不需要周天数据,清除周天字段(设置为空字符串,确保数据库插入时包含该字段)
|
|
|
barPerformance.setPerformanceWeek("");
|
|
barPerformance.setPerformanceWeek("");
|
|
|
break;
|
|
break;
|
|
@@ -163,10 +151,6 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
|
|
|
if (barPerformance.getSingleEndDatetime() == null) {
|
|
if (barPerformance.getSingleEndDatetime() == null) {
|
|
|
throw new IllegalArgumentException("每周定时演出必须填写结束时间");
|
|
throw new IllegalArgumentException("每周定时演出必须填写结束时间");
|
|
|
}
|
|
}
|
|
|
- // 验证时间逻辑:开始时间必须早于结束时间(只比较时间部分,忽略日期部分)
|
|
|
|
|
- if (!isTimeBefore(barPerformance.getSingleStartDatetime(), barPerformance.getSingleEndDatetime())) {
|
|
|
|
|
- throw new IllegalArgumentException("开始时间必须早于结束时间");
|
|
|
|
|
- }
|
|
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
throw new IllegalArgumentException("演出频次类型无效");
|
|
throw new IllegalArgumentException("演出频次类型无效");
|