|  | @@ -2871,7 +2871,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |          Long vipGroupId = returnFeeDto.getVipGroupId();
 | 
	
		
			
				|  |  |          Integer studentId = returnFeeDto.getStudentId();
 | 
	
		
			
				|  |  |          if (Objects.isNull(vipGroupId) || Objects.isNull(studentId)) {
 | 
	
		
			
				|  |  | -            throw new BizException("请指定小课与学生");
 | 
	
		
			
				|  |  | +            throw new BizException("请指定课程与学生");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          SysUser user = teacherDao.getUser(studentId);
 | 
	
		
			
				|  |  |          if (user == null) {
 | 
	
	
		
			
				|  | @@ -2892,7 +2892,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |              throw new BizException("课程 {} {} 不支持退学", vipGroupId, vipGroup.getName());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
 | 
	
		
			
				|  |  | +        List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(),vipGroup.getGroupType(), studentId);
 | 
	
		
			
				|  |  |          if (!CollectionUtils.isEmpty(studentApplyRefunds)) {
 | 
	
		
			
				|  |  |              throw new BizException("学生 {} {} 存在退课申请", studentId, user.getUsername());
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -2940,10 +2940,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |          if (vipGroup.getName().startsWith("考前辅导课")) {
 | 
	
		
			
				|  |  |              return;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |          VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(vipGroup.getVipGroupCategoryId());
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), GroupType.VIP.getCode(), studentId);
 | 
	
		
			
				|  |  | +        List<StudentApplyRefunds> studentApplyRefunds = studentApplyRefundsDao.findByGroupAndUser(vipGroupId.toString(), vipGroup.getGroupType(), studentId);
 | 
	
		
			
				|  |  |          if (!CollectionUtils.isEmpty(studentApplyRefunds)) {
 | 
	
		
			
				|  |  |              return;
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -2965,20 +2964,18 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |              if (Objects.isNull(amount)) {
 | 
	
		
			
				|  |  |                  return;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -//			Map<String, BigDecimal> studentSurplusCourseFee = getStudentSurplusCourseFee(vipGroupId, studentId);
 | 
	
		
			
				|  |  | -//			BigDecimal suplusCourseFee = studentSurplusCourseFee.get("suplusCourseOriginalFee");
 | 
	
		
			
				|  |  | -//			if(amount.compareTo(suplusCourseFee) > 0){
 | 
	
		
			
				|  |  | -//				throw new BizException("学员最大可退费金额为{}元", suplusCourseFee.toString());
 | 
	
		
			
				|  |  | -//			}
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        //退还活动购买
 | 
	
		
			
				|  |  | -//        ActivityUserMapper activityUserMapper = activityUserMapperService.findByStudentId(vipGroup.getId(), studentId);
 | 
	
		
			
				|  |  | -//        HttpResponseResult result = groupClassService.quitActivityGive(activityUserMapper, returnFeeDto.getConfirmReturnActivityGive(), vipGroup.getId(), VIP);
 | 
	
		
			
				|  |  | +        GroupType groupType = GroupType.VIP;
 | 
	
		
			
				|  |  | +        ReturnFeeEnum returnFeeEnum = ReturnFeeEnum.VIP;
 | 
	
		
			
				|  |  | +        if("LIVE".equals(vipGroup.getGroupType())){
 | 
	
		
			
				|  |  | +            groupType = GroupType.LIVE;
 | 
	
		
			
				|  |  | +            returnFeeEnum = ReturnFeeEnum.LIVE;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          if (classStudentMapperByUserIdAndClassGroupId.getStatus().equals(ClassGroupStudentStatusEnum.QUIT_SCHOOL)) {
 | 
	
		
			
				|  |  |              classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.QUIT);
 | 
	
		
			
				|  |  |              classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
 | 
	
		
			
				|  |  | -            studentPauseInfoDao.deleteUserPauseInfoWithGroup(GroupType.VIP, vipGroupId.toString(), studentId);
 | 
	
		
			
				|  |  | +            studentPauseInfoDao.deleteUserPauseInfoWithGroup(groupType, vipGroupId.toString(), studentId);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              classGroup.setStudentNum(classGroup.getStudentNum() - 1);
 | 
	
		
			
				|  |  |              classGroupDao.update(classGroup);
 | 
	
	
		
			
				|  | @@ -2988,18 +2985,18 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |          //记录日志
 | 
	
		
			
				|  |  |          SysUserCashAccountLog sysUserCashAccountLog = new SysUserCashAccountLog();
 | 
	
		
			
				|  |  |          sysUserCashAccountLog.setUserId(studentId);
 | 
	
		
			
				|  |  | -        sysUserCashAccountLog.setGroupType(VIP);
 | 
	
		
			
				|  |  | +        sysUserCashAccountLog.setGroupType(groupType);
 | 
	
		
			
				|  |  |          sysUserCashAccountLog.setOrganId(vipGroup.getOrganId());
 | 
	
		
			
				|  |  |          sysUserCashAccountLog.setGroupId(vipGroupId.toString());
 | 
	
		
			
				|  |  |          sysUserCashAccountLog.setAmount(amount);
 | 
	
		
			
				|  |  | -        sysUserCashAccountLog.setReturnFeeType(ReturnFeeEnum.VIP);
 | 
	
		
			
				|  |  | -        sysUserCashAccountLog.setComment("OA审批VIP退课");
 | 
	
		
			
				|  |  | +        sysUserCashAccountLog.setReturnFeeType(returnFeeEnum);
 | 
	
		
			
				|  |  | +        sysUserCashAccountLog.setComment("OA审批" + groupType.getDesc() + "退学");
 | 
	
		
			
				|  |  |          sysUserCashAccountLogDao.insert(sysUserCashAccountLog);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.QUIT);
 | 
	
		
			
				|  |  |          classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        courseScheduleService.batchDeleteMusicGroupCourseWithStudent(vipGroupId.toString(), studentId, GroupType.VIP);
 | 
	
		
			
				|  |  | +        courseScheduleService.batchDeleteMusicGroupCourseWithStudent(vipGroupId.toString(), studentId, groupType);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          List<Integer> studentPaymentIds = courseScheduleStudentPaymentDao.findNotStartCourseStudentPaymentIdsWithClassGroupAndStudent(classGroup.getId(), studentId);
 | 
	
		
			
				|  |  |          if (!CollectionUtils.isEmpty(studentPaymentIds)) {
 |