|
@@ -227,4 +227,18 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
|
|
|
public List<FeeStudentDto> queryFeeStudents(String musicGroupId,String search,Integer subjectId) {
|
|
|
return musicGroupStudentFeeDao.queryFeeStudents(musicGroupId,search,subjectId);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public void batchDel(String musicGroupPaymentCalenderIds) {
|
|
|
+ List<MusicGroupPaymentCalenderDetail> details = musicGroupPaymentCalenderDetailDao.queryListByIds(musicGroupPaymentCalenderIds);
|
|
|
+ if(details == null || details.size() == 0){
|
|
|
+ throw new BizException("删除失败: 数据不可为空");
|
|
|
+ }
|
|
|
+ long count = details.stream().filter(e -> e.getPaymentStatus() == PAID_COMPLETED).count();
|
|
|
+ if(count > 0){
|
|
|
+ throw new BizException("删除失败: 存在已缴费的学员");
|
|
|
+ }
|
|
|
+ musicGroupPaymentCalenderDetailDao.batchDel(musicGroupPaymentCalenderIds);
|
|
|
+ }
|
|
|
}
|