|
@@ -450,16 +450,23 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
|
|
if(details == null || details.size() == 0){
|
|
if(details == null || details.size() == 0){
|
|
throw new BizException("删除失败: 数据不可为空");
|
|
throw new BizException("删除失败: 数据不可为空");
|
|
}
|
|
}
|
|
|
|
+ //是否已缴费
|
|
long count = details.stream().filter(e -> e.getPaymentStatus() != NON_PAYMENT).count();
|
|
long count = details.stream().filter(e -> e.getPaymentStatus() != NON_PAYMENT).count();
|
|
if(count > 0){
|
|
if(count > 0){
|
|
throw new BizException("删除失败: 存在已缴费的学员");
|
|
throw new BizException("删除失败: 存在已缴费的学员");
|
|
}
|
|
}
|
|
- musicGroupPaymentCalenderDetailDao.batchDel(musicGroupPaymentCalenderDetailIds);
|
|
|
|
-
|
|
|
|
List<Long> musicGroupPaymentCalenderDetailIdList = new ArrayList<Long>();
|
|
List<Long> musicGroupPaymentCalenderDetailIdList = new ArrayList<Long>();
|
|
for(String s : musicGroupPaymentCalenderDetailIds.split(",")){
|
|
for(String s : musicGroupPaymentCalenderDetailIds.split(",")){
|
|
musicGroupPaymentCalenderDetailIdList.add(Long.parseLong(s));
|
|
musicGroupPaymentCalenderDetailIdList.add(Long.parseLong(s));
|
|
}
|
|
}
|
|
|
|
+ //是否已排课
|
|
|
|
+ List<MusicGroupPaymentStudentCourseDetail> musicGroupPaymentStudentCourseDetailList = musicGroupPaymentStudentCourseDetailDao.queryByMusicGroupPaymentStudentCourseDetailId(musicGroupPaymentCalenderDetailIdList);
|
|
|
|
+ count = musicGroupPaymentStudentCourseDetailList.stream().filter(e -> e.getUsedCourseMinutes() > 0).count();
|
|
|
|
+ if(count > 0){
|
|
|
|
+ throw new BizException("删除失败:存在已排课的学员");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ musicGroupPaymentCalenderDetailDao.batchDel(musicGroupPaymentCalenderDetailIds);
|
|
musicGroupPaymentStudentCourseDetailDao.deleteByMusicGroupPaymentCalenderDetailId(musicGroupPaymentCalenderDetailIdList);
|
|
musicGroupPaymentStudentCourseDetailDao.deleteByMusicGroupPaymentCalenderDetailId(musicGroupPaymentCalenderDetailIdList);
|
|
}
|
|
}
|
|
}
|
|
}
|