zouxuan 5 năm trước cách đây
mục cha
commit
38575f7020

+ 5 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -499,7 +499,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
         String musicGroupId = studentRegistration.getMusicGroupId();
 
         StudentRegistration phoneAndMusicGroupId = studentRegistrationDao.getByPhoneAndMusicGroupId(musicGroupId, studentRegistration.getParentsPhone());
-        if (phoneAndMusicGroupId != null && phoneAndMusicGroupId.getMusicGroupStatus() != StudentMusicGroupStatusEnum.QUIT) {
+        if (phoneAndMusicGroupId != null && phoneAndMusicGroupId.getMusicGroupStatus() != StudentMusicGroupStatusEnum.QUIT && phoneAndMusicGroupId.getMusicGroupStatus() != StudentMusicGroupStatusEnum.APPLY) {
             throw new BizException("该学员已存在");
         } else {
             SysUser sysUser = studentRegistrationDao.getSysUserByPhone(studentRegistration.getParentsPhone());
@@ -556,6 +556,10 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                     }
                 }
             }
+            MusicGroupStudentFee studentFeeDaoByUser = musicGroupStudentFeeDao.findByUser(userId, musicGroupId);
+            if(studentFeeDaoByUser != null){
+                throw new BizException("该学员已存在");
+            }
             studentRegistration.setActualSubjectId(studentRegistration.getSubjectId());
             studentRegistration.setUserId(userId);
             studentRegistration.setPaymentStatus(PaymentStatusEnum.OPEN);