|  | @@ -1459,6 +1459,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |          Integer[] teachModeSequence=JSON.parseArray(courseInfo.get("teaChModeSequence").toString(), Integer.class).stream().toArray(Integer[]::new);
 | 
	
		
			
				|  |  |  		List<BigDecimal> coursePrices = (List<BigDecimal>) courseInfo.get("coursePriceInfo");
 | 
	
		
			
				|  |  |  		coursePrices.sort(Comparator.naturalOrder());
 | 
	
		
			
				|  |  | +		Collections.reverse(coursePrices);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		if(vipGroup.getStatus().equals(VipGroupStatusEnum.PAUSE)){
 | 
	
		
			
				|  |  |  			studentRecoverInfo.setCourseCount(teachModeSequence.length);
 | 
	
	
		
			
				|  | @@ -1492,7 +1493,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |  		List<CourseSchedule> surplusCourseWithGroup = courseScheduleDao.findSurplusCourseWithGroup(GroupType.VIP, studentRecoverInfo.getVipGroupId().toString());
 | 
	
		
			
				|  |  |  		surplusCourseWithGroup.sort(Comparator.comparing(CourseSchedule::getStartClassTime));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -		if(coursePrices.size()<surplusCourseFee.signum()){
 | 
	
		
			
				|  |  | +		if(coursePrices.size()<surplusCourseWithGroup.size()){
 | 
	
		
			
				|  |  |  			throw new BizException("剩余课时不足,无法与现有课时对齐");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1514,7 +1515,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 | 
	
		
			
				|  |  |  		if(!CollectionUtils.isEmpty(courseScheduleStudentPaymentList)){
 | 
	
		
			
				|  |  |  			courseScheduleStudentPaymentDao.batchInsert(courseScheduleStudentPaymentList);
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | -		sysUserCashAccountService.updateCourseBalance(studentRecoverInfo.getUserId(), surplusCourseFee);
 | 
	
		
			
				|  |  | +		sysUserCashAccountService.updateCourseBalance(studentRecoverInfo.getUserId(), surplusCourseFee.negate());
 | 
	
		
			
				|  |  |  		classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.NORMAL);
 | 
	
		
			
				|  |  |  		classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
 | 
	
		
			
				|  |  |  		studentPauseInfo.setDelFlag(1);
 |