Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 5 years ago
parent
commit
5bd962ec49

+ 5 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -386,6 +386,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				.map(CourseSchedule::getId)
 				.collect(Collectors.toList());
 
+		HashSet<Long> courseScheduleIdsSet = new HashSet<>(existCourseScheduleIds);
+
 		//合并新课程和已存在的课程
 		List<CourseSchedule> allCourseSchedules;
 		if(!CollectionUtils.isEmpty(existCourseSchedules)){
@@ -420,6 +422,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
 		//将课程计划按照开课时间排序
 		allCourseSchedules.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
+        System.out.println(DateUtil.dateToString(new Date(), "HH:mm:ss"));
 		if(allCourseSchedules.size()>1){
 		    //记录连续冲突的次数
 		    Integer repeatTimes=0;
@@ -432,8 +435,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                     //判断前后两节课是否存在冲突
                     if(backCourseSchedule.getStartClassTime().before(preCourseSchedule.getEndClassTime())){
 						if(!checkExistCourseSchedule
-								&&existCourseScheduleIds.contains(preCourseSchedule.getId())
-								&&existCourseScheduleIds.contains(backCourseSchedule.getId())){
+								&&courseScheduleIdsSet.contains(preCourseSchedule.getId())
+								&&courseScheduleIdsSet.contains(backCourseSchedule.getId())){
 							if(j==repeatTimes){
 								repeatTimes+=1;
 							}

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

@@ -1624,7 +1624,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			throw new BizException("班级不存在");
 		}
 
-		if(!vipGroup.getStatus().equals(VipGroupStatusEnum.PROGRESS)){
+		if(!vipGroup.getStatus().equals(VipGroupStatusEnum.PROGRESS)
+			&&!vipGroup.getStatus().equals(VipGroupStatusEnum.APPLYING_END)){
 			throw new BizException("此状态的vip课程不支持加课");
 		}