Эх сурвалжийг харах

商家端 正常营业时间效验

qinxuyang 1 сар өмнө
parent
commit
446afb65ba

+ 8 - 8
alien-store/src/main/java/shop/alien/store/controller/StoreBookingBusinessHoursController.java

@@ -110,14 +110,14 @@ public class StoreBookingBusinessHoursController {
 //        }
         
         // 如果选择非全天,必须填写开始时间和结束时间
-        if (dto.getBookingTimeType() != null && dto.getBookingTimeType() == 0) {
-            if (!StringUtils.hasText(dto.getStartTime())) {
-                return R.fail("非全天时必须填写开始时间");
-            }
-            if (!StringUtils.hasText(dto.getEndTime())) {
-                return R.fail("非全天时必须填写结束时间");
-            }
-        }
+//        if (dto.getBookingTimeType() != null && dto.getBookingTimeType() == 0) {
+//            if (!StringUtils.hasText(dto.getStartTime())) {
+//                return R.fail("非全天时必须填写开始时间");
+//            }
+//            if (!StringUtils.hasText(dto.getEndTime())) {
+//                return R.fail("非全天时必须填写结束时间");
+//            }
+//        }
         
         try {
             StoreBookingBusinessHours businessHours = new StoreBookingBusinessHours();

+ 14 - 14
alien-store/src/main/java/shop/alien/store/controller/StoreBookingSettingsController.java

@@ -104,20 +104,20 @@ public class StoreBookingSettingsController {
 //        }
         
         // 验证正常营业时间
-        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.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()) {