|
@@ -53,6 +53,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public boolean create(MusicGroupPaymentCalender musicGroupPaymentCalender) {
|
|
|
+ String musicGroupId = musicGroupPaymentCalender.getMusicGroupId();
|
|
|
+
|
|
|
+ musicGroupDao.getLocked(musicGroupId);
|
|
|
|
|
|
Date date = new Date();
|
|
|
List<MusicGroupStudentFee> musicGroupStudentFeeList = null;
|
|
@@ -61,8 +64,8 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
musicGroupPaymentCalender.setUpdateTime(date);
|
|
|
musicGroupPaymentCalender.setDeadlinePaymentDate(DateUtil.addDays(musicGroupPaymentCalender.getStartPaymentDate(), 3));
|
|
|
// 判断缴费开始时间、结束时间是否被其他缴费记录占用
|
|
|
- int count = musicGroupPaymentCalenderDao.queryIntersectionByPaymentDate(musicGroupPaymentCalender.getMusicGroupId(),
|
|
|
- musicGroupPaymentCalender.getStartPaymentDate(), musicGroupPaymentCalender.getDeadlinePaymentDate());
|
|
|
+ int count = musicGroupPaymentCalenderDao.queryIntersectionByPaymentDate(musicGroupId, musicGroupPaymentCalender.getStartPaymentDate(),
|
|
|
+ musicGroupPaymentCalender.getDeadlinePaymentDate());
|
|
|
if (count > 0) {
|
|
|
throw new BizException("缴费时间存在冲突,请修改缴费开始日期");
|
|
|
}
|
|
@@ -71,7 +74,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
} else if (date.after(musicGroupPaymentCalender.getStartPaymentDate())) {
|
|
|
musicGroupPaymentCalender.setPaymentStatus(PaymentStatusEnum.OPEN);
|
|
|
// 统计缴费人数
|
|
|
- musicGroupStudentFeeList = musicGroupStudentFeeDao.queryByMusicGroupId(musicGroupPaymentCalender.getMusicGroupId());
|
|
|
+ musicGroupStudentFeeList = musicGroupStudentFeeDao.queryByMusicGroupId(musicGroupId);
|
|
|
if (musicGroupStudentFeeList == null) {
|
|
|
musicGroupStudentFeeList = new ArrayList<>();
|
|
|
}
|