|  | @@ -3201,13 +3201,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |              classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.QUIT);
 | 
	
		
			
				|  |  |              classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
 | 
	
		
			
				|  |  |              studentPauseInfoDao.deleteUserPauseInfoWithGroup(groupType, vipGroupId.toString(), studentId);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            classGroup.setStudentNum(classGroup.getStudentNum() - 1);
 | 
	
		
			
				|  |  | -            classGroupDao.update(classGroup);
 | 
	
		
			
				|  |  | +            classGroupDao.modifyStudentNum(classGroup.getId(),-1);
 | 
	
		
			
				|  |  |              return;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.QUIT);
 | 
	
		
			
				|  |  |          classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
 | 
	
		
			
				|  |  |          List<CourseSchedule> musicGroupCourseSchedules = courseScheduleDao.findMusicGroupCourseSchedulesWithStudent(vipGroupId.toString(), groupType.getCode(), CourseStatusEnum.NOT_START.getCode(), studentId);
 | 
	
	
		
			
				|  | @@ -3217,7 +3214,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |                      .collect(Collectors.toList());
 | 
	
		
			
				|  |  |              courseScheduleDao.deleteMusicGroupCourseSchedulesWithStudent(courseScheduleIds, studentId);
 | 
	
		
			
				|  |  |              studentAttendanceDao.deleteByCourseAndUser(courseScheduleIds,studentId);
 | 
	
		
			
				|  |  | -            if(groupType == LIVE){
 | 
	
		
			
				|  |  | +            /*if(groupType == LIVE){
 | 
	
		
			
				|  |  |                  List<CourseScheduleStudentPayment> studentPayments = courseScheduleStudentPaymentDao.findByCourseScheduleIds(courseScheduleIds);
 | 
	
		
			
				|  |  |                  Map<Long, Integer> courseStudentNumMap = studentPayments.stream().filter(e -> e.getJoinCourseType() == JoinCourseType.PURCHASE)
 | 
	
		
			
				|  |  |                          .collect(Collectors.groupingBy(e -> e.getCourseScheduleId(), Collectors.collectingAndThen(Collectors.toList(), v -> v.size())));
 | 
	
	
		
			
				|  | @@ -3266,17 +3263,14 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |                          log.error("liveRoom error", e);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | +            }*/
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          if (!vipGroup.getStatus().equals(VipGroupStatusEnum.APPLYING) || (Objects.nonNull(vipGroupCategory) && vipGroupCategory.getMusicTheory())) {
 | 
	
		
			
				|  |  |              courseScheduleTeacherSalaryService.updateVipGroupCourseTeacherSalary(vipGroupId.intValue(), vipGroup.getUserId());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        classGroup.setStudentNum(classGroup.getStudentNum() - 1);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        classGroupDao.update(classGroup);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        classGroupDao.modifyStudentNum(classGroup.getId(),-1);
 | 
	
		
			
				|  |  |          //学员退出班级群
 | 
	
		
			
				|  |  |          imGroupMemberService.quit(classGroup.getId().toString(), studentId);
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -5191,7 +5185,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |          if (!vipGroup.getStatus().equals(VipGroupStatusEnum.CANCEL)) {
 | 
	
		
			
				|  |  |              throw new BizException("课程组不是取消状态");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        List<CourseSchedule> schedules = courseScheduleDao.findGroupCourseSchedules(id.toString(), vipGroup.getGroupType());
 | 
	
		
			
				|  |  | +        if(!CollectionUtils.isEmpty(schedules)){
 | 
	
		
			
				|  |  | +            throw new BizException("当前课程组已排课");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          vipGroupDao.del(id);
 | 
	
		
			
				|  |  |          return true;
 | 
	
		
			
				|  |  |      }
 |