|
|
@@ -89,49 +89,7 @@ public class StoreBookingSettingsController {
|
|
|
if (dto.getBookingNotAvailableTime() == null || dto.getBookingNotAvailableTime() < 0) {
|
|
|
return R.fail("营业时间结束前不可预订时间必须大于等于0");
|
|
|
}
|
|
|
-
|
|
|
- // 如果选择非全天,必须填写开始时间和结束时间
|
|
|
-// if (dto.getBookingTimeType() != null && dto.getBookingTimeType() == 0) {
|
|
|
-// if (!StringUtils.hasText(dto.getBookingStartTime())) {
|
|
|
-// return R.fail("非全天时必须填写开始时间");
|
|
|
-// }
|
|
|
-// if (!StringUtils.hasText(dto.getBookingEndTime())) {
|
|
|
-// return R.fail("非全天时必须填写结束时间");
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
- // 验证正常营业时间
|
|
|
-// if (dto.getNormalBusinessHours() != null) {
|
|
|
-// StoreBookingBusinessHoursDTO normalHours = dto.getNormalBusinessHours();
|
|
|
-// if (normalHours.getBookingTimeType() == null) {
|
|
|
-// return R.fail("正常营业时间的预订时间类型不能为空");
|
|
|
-// }
|
|
|
-// if (normalHours.getBookingTimeType() == 0) {
|
|
|
-// if (!StringUtils.hasText(normalHours.getStartTime())) {
|
|
|
-// return R.fail("正常营业时间非全天时必须填写开始时间");
|
|
|
-// }
|
|
|
-// if (!StringUtils.hasText(normalHours.getEndTime())) {
|
|
|
-// return R.fail("正常营业时间非全天时必须填写结束时间");
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
- // 验证特殊营业时间列表
|
|
|
-// if (dto.getSpecialBusinessHoursList() != null && !dto.getSpecialBusinessHoursList().isEmpty()) {
|
|
|
-// for (StoreBookingBusinessHoursDTO specialHours : dto.getSpecialBusinessHoursList()) {
|
|
|
-// if (specialHours.getBookingTimeType() == null) {
|
|
|
-// return R.fail("特殊营业时间的预订时间类型不能为空");
|
|
|
-// }
|
|
|
-// if (specialHours.getBookingTimeType() == 0) {
|
|
|
-// if (!StringUtils.hasText(specialHours.getStartTime())) {
|
|
|
-// return R.fail("特殊营业时间非全天时必须填写开始时间");
|
|
|
-// }
|
|
|
-// if (!StringUtils.hasText(specialHours.getEndTime())) {
|
|
|
-// return R.fail("特殊营业时间非全天时必须填写结束时间");
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+
|
|
|
|
|
|
// 编辑校验:如果是编辑操作,检查正常营业时间的id是否有值
|
|
|
// 注意:特殊营业时间列表中的项可以部分有id(编辑)部分没有id(新增)
|