|
@@ -152,7 +152,7 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
|
|
|
// Date deadlinePaymentDate = calender.getDeadlinePaymentDate();
|
|
|
int length = ids.split(",").length;
|
|
|
Date date = new Date();
|
|
|
- Iterator<MusicGroupPaymentCalenderDetail> iterator = calenderDetails.iterator();
|
|
|
+ /*Iterator<MusicGroupPaymentCalenderDetail> iterator = calenderDetails.iterator();
|
|
|
MusicGroupPaymentCalenderDetail next;
|
|
|
while(iterator.hasNext()){
|
|
|
next = iterator.next();
|
|
@@ -160,16 +160,17 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
|
|
|
if(countOpenPayment > 0){
|
|
|
iterator.remove();
|
|
|
}
|
|
|
- /*int count1 = musicGroupPaymentCalenderDao.queryIntersectionByPaymentDate(next.getMusicGroupId(),startPaymentDate,deadlinePaymentDate);
|
|
|
+ *//*int count1 = musicGroupPaymentCalenderDao.queryIntersectionByPaymentDate(next.getMusicGroupId(),startPaymentDate,deadlinePaymentDate);
|
|
|
int count = musicGroupPaymentCalenderDetailDao.queryIntersectionByPaymentDate(next.getMusicGroupId(),next.getUserId());
|
|
|
if(count > 0 || count1 > 0){
|
|
|
iterator.remove();
|
|
|
- }*/
|
|
|
- }
|
|
|
- if(calenderDetails.size() == 0){
|
|
|
+ }*//*
|
|
|
+ }*/
|
|
|
+ /*if(calenderDetails.size() == 0){
|
|
|
return "操作失败,学员有未完成的订单";
|
|
|
- }
|
|
|
- String musicGroupId = calenderDetails.get(0).getMusicGroupId();
|
|
|
+ }*/
|
|
|
+ Long calenderId = calenderDetails.get(0).getMusicGroupPaymentCalenderId();
|
|
|
+ MusicGroupPaymentCalender calender = musicGroupPaymentCalenderDao.get(calenderId);
|
|
|
calenderDetails.forEach(e->{
|
|
|
e.setUpdateTime(date);
|
|
|
e.setOpen(1);
|
|
@@ -179,7 +180,7 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
|
|
|
});
|
|
|
musicGroupPaymentCalenderDetailDao.batchUpdate(calenderDetails);
|
|
|
//修改学员缴费状态为未缴费
|
|
|
- musicGroupStudentFeeDao.setNoPayment(calenderDetails);
|
|
|
+// musicGroupStudentFeeDao.setNoPayment(calenderDetails);
|
|
|
Set<Integer> studentIds = calenderDetails.stream().map(e -> e.getUserId()).collect(Collectors.toSet());
|
|
|
//推送消息
|
|
|
if (studentIds.size() > 0) {
|
|
@@ -187,9 +188,9 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
|
|
|
for (Integer userId : studentIds) {
|
|
|
push.put(userId, userId + "");
|
|
|
}
|
|
|
- MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(calender.getMusicGroupId());
|
|
|
String baseUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
- String memo = "4?" + baseUrl + "/#/renew?musicGroupId=" + musicGroupId;
|
|
|
+ String memo = "4?" + baseUrl + "/#/renew?musicGroupId=" + calender.getMusicGroupId();
|
|
|
// 发送续费通知
|
|
|
sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_WAIT_RENEW_MESSAGE, push, null, 0, memo,"STUDENT",musicGroup.getName());
|
|
|
}
|