zouxuan 5 년 전
부모
커밋
039e481832
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

+ 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) {
-			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("修改失败:学员不存在或已退团");
 			}
 		}