|  | @@ -664,7 +664,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 | 
	
		
			
				|  |  |  				musicOneSubjectClassPlan.setPaidStudentNum(paidNum + 1);
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        if (musicOneSubjectClassPlan.getPaidStudentNum() > musicOneSubjectClassPlan.getExpectedStudentNum()) {
 | 
	
		
			
				|  |  | +        if (studentRegistration.getMusicGroupStatus() != StudentMusicGroupStatusEnum.NORMAL && musicOneSubjectClassPlan.getPaidStudentNum() > musicOneSubjectClassPlan.getExpectedStudentNum()) {
 | 
	
		
			
				|  |  |              throw new BizException("乐团该声部人数暂时已满,请稍后再试");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          
 | 
	
	
		
			
				|  | @@ -2020,12 +2020,30 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 | 
	
		
			
				|  |  |          studentRegistration.setPaymentStatus(YES);
 | 
	
		
			
				|  |  |          studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
 | 
	
		
			
				|  |  |          studentRegistrationDao.update(studentRegistration);
 | 
	
		
			
				|  |  | -        StudentPaymentOrder order = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(studentRegistration.getUserId(), studentRegistration.getMusicGroupId(), DealStatusEnum.SUCCESS);
 | 
	
		
			
				|  |  | +        /*StudentPaymentOrder order = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(studentRegistration.getUserId(), studentRegistration.getMusicGroupId(), DealStatusEnum.SUCCESS);
 | 
	
		
			
				|  |  |  		if (order != null) {
 | 
	
		
			
				|  |  |  			order.setPaymentAccountNo("200");
 | 
	
		
			
				|  |  |  			if (studentPaymentOrderService.update(order) <= 0) {
 | 
	
		
			
				|  |  |  				throw new BizException("订单处理失败,请重试");
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | +		}*/
 | 
	
		
			
				|  |  | +        
 | 
	
		
			
				|  |  | +		List<StudentPaymentOrder> studentPaymentOrderList = studentPaymentOrderService.queryByCondition(GroupType.MUSIC, studentRegistration.getMusicGroupId(), studentRegistration.getUserId(), DealStatusEnum.ING, OrderTypeEnum.APPLY);
 | 
	
		
			
				|  |  | +		
 | 
	
		
			
				|  |  | +		List<StudentPaymentOrder> updateList = new ArrayList<StudentPaymentOrder>();
 | 
	
		
			
				|  |  | +		
 | 
	
		
			
				|  |  | +		if(studentPaymentOrderList != null && studentPaymentOrderList.size() > 0){
 | 
	
		
			
				|  |  | +			for(StudentPaymentOrder studentPaymentOrder : studentPaymentOrderList){
 | 
	
		
			
				|  |  | +				if(StringUtils.equals("205", studentPaymentOrder.getPaymentAccountNo())){
 | 
	
		
			
				|  |  | +					studentPaymentOrder.setStatus(DealStatusEnum.CLOSE);
 | 
	
		
			
				|  |  | +					studentPaymentOrder.setMemo("用户未支付");
 | 
	
		
			
				|  |  | +					updateList.add(studentPaymentOrder);
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		
 | 
	
		
			
				|  |  | +		if(updateList.size() > 0){
 | 
	
		
			
				|  |  | +			studentPaymentOrderService.batchUpdate(updateList);
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |          
 | 
	
		
			
				|  |  |          musicOneSubjectClassPlan.setPaidZeroNum(paidZeroNum + 1);
 |