|
@@ -1351,8 +1351,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
+ musicGroupId, "", PlatformCashAccountDetailTypeEnum.REFUNDS, null, SUCCESS, "取消乐团", null);
|
|
|
}*/
|
|
|
//获取当前乐团所有已报名学员
|
|
|
+ List<StudentRegistration> registrations = studentRegistrationDao.findClassGroupStu(musicGroupId, null);
|
|
|
if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
|
|
|
- List<StudentRegistration> registrations = studentRegistrationDao.findClassGroupStu(musicGroupId, null);
|
|
|
if (registrations != null && registrations.size() > 0) {
|
|
|
Map<Integer, String> map = new HashMap<>(registrations.size());
|
|
|
registrations.forEach(e -> {
|
|
@@ -1363,7 +1363,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
}
|
|
|
//将学生退团
|
|
|
- if (studentRegistrationService.quitAllStudent(musicGroup.getId(), "退团(乐团关闭)") <= 0) {
|
|
|
+ if (registrations.size() > 0 && studentRegistrationService.quitAllStudent(musicGroup.getId(), "退团(乐团关闭)") <= 0) {
|
|
|
throw new BizException("处理学生退团失败,请重试");
|
|
|
}
|
|
|
//记录建团日志
|
|
@@ -2975,7 +2975,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
courseScheduleDao.logicDeleteCourseSchedulesByMusicGroupID(musicGroup.getId());
|
|
|
|
|
|
//将学生退团
|
|
|
- if (studentRegistrationService.quitAllStudent(musicGroup.getId(), "退团(乐团关闭)") <= 0) {
|
|
|
+ List<StudentRegistration> registrations = studentRegistrationDao.findClassGroupStu(musicGroup.getId(), null);
|
|
|
+ if (registrations.size() > 0 && studentRegistrationService.quitAllStudent(musicGroup.getId(), "退团(乐团关闭)") <= 0) {
|
|
|
throw new BizException("处理学生退团失败,请重试");
|
|
|
}
|
|
|
|