|
@@ -2289,20 +2289,26 @@ public class ExportServiceImpl implements ExportService {
|
|
|
//获取合作单位第一个乐团
|
|
|
firstMusicMap = MapUtil.convertMybatisMap(cooperationOrganDao.findFirstMusic());
|
|
|
}
|
|
|
- List<Integer> studentIds = studentPaymentOrderExportDtos.stream().map(e -> e.getUserId()).distinct().collect(Collectors.toList());
|
|
|
- //获取学员第一个课程组编号
|
|
|
- Map<Integer, String> userFirstVipMap = MapUtil.convertMybatisMap(courseScheduleStudentPaymentDao.findUserFirstVipMap("VIP",studentIds));
|
|
|
- //获取学员最近加入的一个乐团编号
|
|
|
- Map<Integer, String> userLastMusicIdMap = MapUtil.convertMybatisMap(studentRegistrationDao.getLastMusicGroupId(studentIds));
|
|
|
- Map<Integer, String> userLastMusicNameMap = MapUtil.convertMybatisMap(studentRegistrationDao.getLastMusicGroupName(studentIds));
|
|
|
+ Map<Integer, String> userFirstVipMap = new HashMap<>();
|
|
|
+ Map<Integer, String> userLastMusicIdMap = new HashMap<>();
|
|
|
+ Map<Integer, String> userLastMusicNameMap = new HashMap<>();
|
|
|
+ Map<Integer, String> studentNameMap = new HashMap<>();
|
|
|
+ if(studentPaymentOrderExportDtos.stream().anyMatch(e->e.getUserId() != null)){
|
|
|
+ List<Integer> studentIds = studentPaymentOrderExportDtos.stream().filter(e->e.getUserId() != null).map(e -> e.getUserId()).distinct().collect(Collectors.toList());
|
|
|
+ //获取学员第一个课程组编号
|
|
|
+ userFirstVipMap = MapUtil.convertMybatisMap(courseScheduleStudentPaymentDao.findUserFirstVipMap("VIP",studentIds));
|
|
|
+ //获取学员最近加入的一个乐团编号
|
|
|
+ userLastMusicIdMap = MapUtil.convertMybatisMap(studentRegistrationDao.getLastMusicGroupId(studentIds));
|
|
|
+ userLastMusicNameMap = MapUtil.convertMybatisMap(studentRegistrationDao.getLastMusicGroupName(studentIds));
|
|
|
+ //获取学员名称
|
|
|
+ studentNameMap = studentService.getMap("sys_user", "id_", "username_", studentIds, tenantId, Integer.class, String.class);
|
|
|
+ }
|
|
|
+
|
|
|
Set<String> musicGroupIds = studentPaymentOrderExportDtos.stream().map(e -> e.getMusicGroupId()).collect(Collectors.toSet());
|
|
|
Map<String, String> musicGroupNameMap = new HashMap<>();
|
|
|
if(musicGroupIds != null && musicGroupIds.size() > 0){
|
|
|
musicGroupNameMap = MapUtil.convertIntegerMap(musicGroupDao.queryMusicGroupNameMap(musicGroupIds));
|
|
|
}
|
|
|
- //获取学员名称
|
|
|
- Map<Integer, String> studentNameMap = studentService.getMap("sys_user", "id_", "username_", studentIds, tenantId, Integer.class, String.class);
|
|
|
-
|
|
|
//用于计算手续费
|
|
|
Map<String, FeeFlagNumDto> feeFlagMap = new HashMap<>();
|
|
|
if(studentPaymentOrderExportDtos.stream().anyMatch(e->Objects.equals(e.getPaymentChannel(),"ADAPAY"))){
|