|  | @@ -5240,12 +5240,19 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 | 
	
		
			
				|  |  |  		if(CollectionUtils.isEmpty(courseMergeInfo.getMergeCourseIds())){
 | 
	
		
			
				|  |  |  			throw new BizException("请选择需要合并的课程");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		int courseMergeTime = courseScheduleDao.countCourseMergeTime(courseMergeInfo.getId());
 | 
	
		
			
				|  |  | +		if(courseMergeTime>0){
 | 
	
		
			
				|  |  | +			throw new BizException("存在已合并课程");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		List<Long> allCourseIds = new ArrayList<>();
 | 
	
		
			
				|  |  |  		allCourseIds.add(courseMergeInfo.getId());
 | 
	
		
			
				|  |  |  		allCourseIds.addAll(courseMergeInfo.getMergeCourseIds());
 | 
	
		
			
				|  |  |  		List<CourseSchedule> allCourses = courseScheduleDao.findByCourseScheduleIds(allCourseIds);
 | 
	
		
			
				|  |  |  		Date now = new Date();
 | 
	
		
			
				|  |  |  		for (CourseSchedule courseSchedule : allCourses) {
 | 
	
		
			
				|  |  | +			if(Objects.nonNull(courseSchedule.getNewCourseId())){
 | 
	
		
			
				|  |  | +				throw new BizException("存在已合并课程");
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  |  			if(courseSchedule.getStartClassTime().compareTo(now)<=0){
 | 
	
		
			
				|  |  |  				throw new BizException("课程合并仅支持未开始的课程");
 | 
	
		
			
				|  |  |  			}
 |