|  | @@ -552,16 +552,20 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 | 
	
		
			
				|  |  |          MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId());
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          if (studentPaymentOrder.getStatus().equals(DealStatusEnum.SUCCESS)) {
 | 
	
		
			
				|  |  | +            studentRegistration.setTemporaryCourseFee(new BigDecimal(0));
 | 
	
		
			
				|  |  | +            studentRegistration.setPaymentStatus(PaymentStatusEnum.YES);
 | 
	
		
			
				|  |  | +            studentRegistration.setMusicGroupStatus(ClassGroupStudentStatusEnum.NORMAL);
 | 
	
		
			
				|  |  | +            studentRegistrationDao.update(studentRegistration);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //进行中乐团加入学生缴费
 | 
	
		
			
				|  |  |              if (studentRegistration.getTemporaryCourseFee() != null) {
 | 
	
		
			
				|  |  | -                //关闭订单
 | 
	
		
			
				|  |  | +                //关闭待支付订单
 | 
	
		
			
				|  |  |                  StudentPaymentOrder waitPayOrder = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(studentRegistration.getUserId(), studentRegistration.getMusicGroupId(), DealStatusEnum.WAIT_PAY);
 | 
	
		
			
				|  |  |                  waitPayOrder.setStatus(DealStatusEnum.CLOSE);
 | 
	
		
			
				|  |  |                  studentPaymentOrderService.update(waitPayOrder);
 | 
	
		
			
				|  |  |                  //添加学生
 | 
	
		
			
				|  |  |                  classGroupStudentMapperService.addStudents(waitPayOrder.getClassGroupId(), studentRegistration.getUserId().toString(), GroupType.MUSIC);
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            if (studentRegistration.getTemporaryCourseFee() == null) {
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  |                  //获取当前月
 | 
	
		
			
				|  |  |                  Integer month = Integer.parseInt(DateUtil.getMonth(nowDate));
 | 
	
		
			
				|  |  |                  //获取下次缴费月份
 | 
	
	
		
			
				|  | @@ -589,11 +593,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 | 
	
		
			
				|  |  |                  musicGroupStudentFeeDao.insert(musicGroupStudentFee);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            studentRegistration.setTemporaryCourseFee(new BigDecimal(0));
 | 
	
		
			
				|  |  | -            studentRegistration.setPaymentStatus(PaymentStatusEnum.YES);
 | 
	
		
			
				|  |  | -            studentRegistration.setMusicGroupStatus(ClassGroupStudentStatusEnum.NORMAL);
 | 
	
		
			
				|  |  | -            studentRegistrationDao.update(studentRegistration);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |              //插入交易明细
 | 
	
		
			
				|  |  |              SysUserCashAccount cashAccount = sysUserCashAccountService.get(studentRegistration.getUserId());
 | 
	
		
			
				|  |  |              BigDecimal amount = studentPaymentOrder.getActualAmount();
 | 
	
	
		
			
				|  | @@ -637,7 +636,6 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 | 
	
		
			
				|  |  |                      studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        //失败减去已收款金额
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          //减去缴费人数
 | 
	
		
			
				|  |  |          if (studentPaymentOrder.getStatus().equals(DealStatusEnum.FAILED)) {
 |