|  | @@ -723,6 +723,15 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |          classGroupStudentMapperDao.deleteByClassId(classGroupId);
 | 
	
		
			
				|  |  |          //删除班级关系
 | 
	
		
			
				|  |  |          classGroupRelationDao.deleteByClassId(classGroupId);
 | 
	
		
			
				|  |  | +        //删除班级未开始课程
 | 
	
		
			
				|  |  | +        List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
 | 
	
		
			
				|  |  | +        if (courseScheduleList.size() > 0) {
 | 
	
		
			
				|  |  | +            List<Long> courseScheduleIds = courseScheduleList.stream().map(courseSchedule -> courseSchedule.getId()).collect(Collectors.toList());
 | 
	
		
			
				|  |  | +            courseScheduleDao.batchDeleteCourseSchedules(courseScheduleIds);
 | 
	
		
			
				|  |  | +            courseScheduleTeacherSalaryDao.batchDeleteByCourseScheduleIds(courseScheduleIds);
 | 
	
		
			
				|  |  | +            teacherAttendanceDao.batchDeleteByCourseSchedules(courseScheduleIds);
 | 
	
		
			
				|  |  | +            courseScheduleStudentPaymentDao.deleteByCourseSchedule(courseScheduleIds);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          //删除合奏班
 | 
	
		
			
				|  |  |          classGroupDao.delete(classGroupId);
 | 
	
		
			
				|  |  |          //删除im群组
 | 
	
	
		
			
				|  | @@ -978,6 +987,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |          String subjectIds = subjectList.stream().map(subject -> subject.getId().toString()).collect(Collectors.joining(","));
 | 
	
		
			
				|  |  |          String subjectNames = subjectList.stream().map(subject -> subject.getName()).collect(Collectors.joining("/"));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        if(classGroup4MixDto.getType() == null){
 | 
	
		
			
				|  |  | +            classGroup4MixDto.setType(ClassGroupTypeEnum.NORMAL);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          //1、新建班级
 | 
	
		
			
				|  |  |          ClassGroup classGroup = new ClassGroup();
 | 
	
		
			
				|  |  |          classGroup.setMusicGroupId(classGroup4MixDto.getMusicGroupId());
 | 
	
	
		
			
				|  | @@ -985,7 +997,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |          classGroup.setName(classGroup4MixDto.getClassGroupName());
 | 
	
		
			
				|  |  |          classGroup.setExpectStudentNum(studentList.size());
 | 
	
		
			
				|  |  |          classGroup.setStudentNum(studentList.size());
 | 
	
		
			
				|  |  | -        classGroup.setType(ClassGroupTypeEnum.NORMAL);
 | 
	
		
			
				|  |  | +        classGroup.setType(classGroup4MixDto.getType());
 | 
	
		
			
				|  |  |          classGroup.setDelFlag(0);
 | 
	
		
			
				|  |  |          classGroup.setGroupType(GroupType.MUSIC);
 | 
	
		
			
				|  |  |          classGroup.setCurrentClassTimes(0);
 | 
	
	
		
			
				|  | @@ -999,8 +1011,10 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 | 
	
		
			
				|  |  |          List<ClassGroupStudentMapper> classGroupStudentMapperList = new ArrayList<>();
 | 
	
		
			
				|  |  |          List<Integer> userIds = new ArrayList<>(); //用户ids
 | 
	
		
			
				|  |  |          for (StudentRegistration studentRegistration : studentList) {
 | 
	
		
			
				|  |  | -            studentRegistration.setClassGroupId(classGroup.getId());
 | 
	
		
			
				|  |  | -            studentRegistrationService.update(studentRegistration);
 | 
	
		
			
				|  |  | +            if (classGroup4MixDto.getType().equals(ClassGroupTypeEnum.NORMAL)) {
 | 
	
		
			
				|  |  | +                studentRegistration.setClassGroupId(classGroup.getId());
 | 
	
		
			
				|  |  | +                studentRegistrationService.update(studentRegistration);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              ClassGroupStudentMapper classGroupStudentMapper = new ClassGroupStudentMapper();
 | 
	
		
			
				|  |  |              classGroupStudentMapper.setMusicGroupId(musicGroupId);
 |