zouxuan 5 years ago
parent
commit
039e481832

+ 4 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -304,9 +304,10 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		}
 		}
 		//如果是进行中加学生,查看学员是否在团
 		//如果是进行中加学生,查看学员是否在团
 		if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
 		if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
-			StudentRegistration studentRegistration = studentRegistrationDao.findStudentByMusicGroupIdAndUserId(musicGroupId, Integer.parseInt(musicGroupPaymentCalender.getStudentIds()));
-			if(studentRegistration.getMusicGroupStatus() == StudentMusicGroupStatusEnum.QUIT){
-				throw new BizException("修改失败:学员已退团");
+			musicGroupPaymentCalender.setStudentIds(originMusicGroupPaymentCalender.getStudentIds());
+			StudentRegistration studentRegistration = studentRegistrationDao.queryByUserIdAndMusicGroupId(Integer.parseInt(musicGroupPaymentCalender.getStudentIds()),musicGroupId);
+			if(studentRegistration == null){
+				throw new BizException("修改失败:学员不存在或已退团");
 			}
 			}
 		}
 		}