|
@@ -2093,10 +2093,14 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
Map<Long, String> subjectNames = MapUtil.convertMybatisMap(subjectDao.findBySubjecIds(StringUtils.join(subjectIds, ",")));
|
|
|
Map<Integer, String> organNames = MapUtil.convertMybatisMap(organizationDao.findOrganNameMapList(organIds));
|
|
|
|
|
|
- List<SimpleUserDto> educationalUsers = employeeDao.findByIds(educationalTeacherIds);
|
|
|
- Map<Integer, String> idNameMap = educationalUsers.stream().collect(Collectors.toMap(SimpleUserDto::getUserId, user -> user.getUserName()));
|
|
|
+ Map<Integer, String> idNameMap=new HashMap<>();
|
|
|
+ if(!CollectionUtils.isEmpty(educationalTeacherIds)){
|
|
|
+ List<SimpleUserDto> educationalUsers = employeeDao.findByIds(educationalTeacherIds);
|
|
|
+ idNameMap = educationalUsers.stream().collect(Collectors.toMap(SimpleUserDto::getUserId, user -> user.getUserName()));
|
|
|
+ }
|
|
|
|
|
|
- dataList.forEach(e -> {
|
|
|
+
|
|
|
+ for (PracticeGroupDto e : dataList) {
|
|
|
e.setSubjectName(subjectNames.get(e.getSubjectId().intValue()));
|
|
|
e.setOrganName(organNames.get(e.getOrganId()));
|
|
|
ClassGroup classGroup = vipGroupClassGroupMap.get(e.getId().toString());
|
|
@@ -2108,7 +2112,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
|
Long aLong1 = currentClassTimeMap.get(e.getId() + "");
|
|
|
e.setCurrentClassTimes(aLong1 == null ? 0 : aLong1.intValue());
|
|
|
e.setEducationalTeacherName(idNameMap.get(e.getEducationalTeacherId()));
|
|
|
- });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (count == 0) {
|