|
|
@@ -3258,11 +3258,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
StudentRegistration studentRegistration = studentRegistrationDao.queryByUserIdAndMusicGroupId(userId, musicGroupId);
|
|
|
if (studentRegistration == null) {
|
|
|
- throw new BizException("学员 {} {} 注册信息不存在", userId, user.getUsername());
|
|
|
- }
|
|
|
-
|
|
|
- StudentMusicGroupStatusEnum currentStudentMusicGroupStatus = studentRegistration.getMusicGroupStatus();
|
|
|
- if (currentStudentMusicGroupStatus != StudentMusicGroupStatusEnum.NORMAL && currentStudentMusicGroupStatus != StudentMusicGroupStatusEnum.APPLY) {
|
|
|
+ if (!studentRegistrationDao.hasQuitRegistration(userId, musicGroupId)) {
|
|
|
+ throw new BizException("学员 {} {} 注册信息不存在", userId, user.getUsername());
|
|
|
+ }
|
|
|
+ } else if (studentRegistration.getMusicGroupStatus() != StudentMusicGroupStatusEnum.NORMAL
|
|
|
+ && studentRegistration.getMusicGroupStatus() != StudentMusicGroupStatusEnum.APPLY) {
|
|
|
throw new BizException("学员 {} {} 当前在团状态不能退团", userId, user.getUsername());
|
|
|
}
|
|
|
|