|
@@ -477,8 +477,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
Map<String, BasicUserDto> userDtoMap = userList.stream().collect(Collectors.groupingBy(e -> e.getPhone(), Collectors.collectingAndThen(Collectors.toList(), v -> v.get(0))));
|
|
|
Organization organization = organizationDao.get(calender.getOrganId());
|
|
|
//检查用户是否已入团或在其他机构已注册
|
|
|
- List<StudentRegistration> insertList = new ArrayList<>();
|
|
|
- List<StudentRegistration> updateList = new ArrayList<>();
|
|
|
List<StudentRegistration> allList = new ArrayList<>();
|
|
|
StudentRegistration studentRegistration = null;
|
|
|
SysUser sysUser = null;
|
|
@@ -535,16 +533,17 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentRegistration.setMusicGroupId(musicGroupId);
|
|
|
studentRegistration.setCreateTime(now);
|
|
|
studentRegistration.setUpdateTime(now);
|
|
|
- insertList.add(studentRegistration);
|
|
|
+ studentRegistrationDao.insert(studentRegistration);
|
|
|
+ allList.add(studentRegistration);
|
|
|
applyNum ++;
|
|
|
} else{
|
|
|
if (studentRegistration.getMusicGroupStatus() != StudentMusicGroupStatusEnum.APPLY) {
|
|
|
throw new BizException("学员{}乐团状态不支持导入",si.getStudentName());
|
|
|
}
|
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
|
- updateList.add(studentRegistration);
|
|
|
+ studentRegistrationDao.update(studentRegistration);
|
|
|
+ allList.add(studentRegistration);
|
|
|
}
|
|
|
- allList.add(studentRegistration);
|
|
|
String channelType = "";
|
|
|
String orderNo = idGeneratorService.generatorId("payment") + "";
|
|
|
//生成订单,校验优惠券的使用情况
|
|
@@ -573,12 +572,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentPaymentRouteOrderService.addRouteOrder(orderNo, calender.getOrganId(), calender.getCurrentTotalAmount());
|
|
|
studentPaymentOrderDetailService.addOrderDetailTo1(studentPaymentOrder, musicGroup, studentRegistration,orderDetails);
|
|
|
}
|
|
|
- if (CollectionUtils.isNotEmpty(insertList)) {
|
|
|
- studentRegistrationService.batchInsert(insertList);
|
|
|
- }
|
|
|
- if (CollectionUtils.isNotEmpty(updateList)) {
|
|
|
- studentRegistrationService.batchUpdate(updateList);
|
|
|
- }
|
|
|
if (CollectionUtils.isNotEmpty(allList)) {
|
|
|
Map<Integer, Long> subjectCountMap = allList.stream().collect(
|
|
|
Collectors.groupingBy(StudentRegistration::getActualSubjectId, Collectors.counting()));
|