|
@@ -1874,7 +1874,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public HttpResponseResult checkCourseSchedules(List<CourseSchedule> courseSchedules, boolean checkExistCourseSchedule,Boolean postponeFlag,ClassGroupStudentMapper classGroupStudentMapper) {
|
|
|
-
|
|
|
if (CollectionUtils.isEmpty(courseSchedules)) {
|
|
|
return BaseController.failed();
|
|
|
}
|
|
@@ -1929,14 +1928,17 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
//班级与学生的关联记录
|
|
|
- List<ClassGroupStudentMapper> classGroupStudentMappers = classGroupStudentMapperDao.findByClassGroups(classGroupIds);
|
|
|
Boolean liveFlag = false;
|
|
|
+ List<ClassGroupStudentMapper> classGroupStudentMappers = new ArrayList<>();
|
|
|
if(Objects.nonNull(classGroupStudentMapper)){
|
|
|
classGroupStudentMappers.add(classGroupStudentMapper);
|
|
|
if(classGroupStudentMapper.getGroupType() == LIVE){
|
|
|
liveFlag = true;
|
|
|
}
|
|
|
+ }else {
|
|
|
+ classGroupStudentMappers = classGroupStudentMapperDao.findByClassGroups(classGroupIds);
|
|
|
}
|
|
|
+
|
|
|
Map<Integer, List<ClassGroupStudentMapper>> classGroupStudentsMap = classGroupStudentMappers
|
|
|
.stream()
|
|
|
.collect(Collectors.groupingBy(ClassGroupStudentMapper::getClassGroupId));
|