Explorar el Código

1、提交作业添加限制;

Joburgess hace 5 años
padre
commit
4d0a1fc2a2

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java

@@ -951,7 +951,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         calendar.set(Calendar.MILLISECOND, 0);
         calendar.add(Calendar.DATE, 1);
         Date applyStartDate = calendar.getTime();
-        Date applyEndDate = DateUtil.stringToDate("2020-10-24", "yyyy-MM-dd");
+        Date applyEndDate = DateUtil.stringToDate("2020-05-24", "yyyy-MM-dd");
         Date firstMonday = DateUtil.getWeekDayWithDate(applyStartDate, Calendar.MONDAY);
         Date secondSunday = DateUtil.getWeekDayWithDate(applyEndDate, Calendar.SUNDAY);
 

+ 3 - 3
mec-student/src/main/java/com/ym/mec/student/controller/PracticeGroupController.java

@@ -150,9 +150,9 @@ public class PracticeGroupController extends BaseController {
         if(excludeOrganIds.contains(sysUser.getOrganId())){
             throw new BizException("请联系老师确认您的所属分部");
         }
-//        if(!ENABLE_APPLY_ORGANIDS.contains(sysUser.getOrganId())){
-//            throw new BizException("陪练课预约活动已结束");
-//        }
+        if(!ENABLE_APPLY_ORGANIDS.contains(sysUser.getOrganId())){
+            throw new BizException("陪练课预约活动已结束");
+        }
         practiceGroup.setStudentId(sysUser.getId());
         return succeed(practiceGroupService.practiceApply(practiceGroup));
     }