Browse Source

feat: 教师端课程批量调整

Joburgess 4 năm trước cách đây
mục cha
commit
57aeba465a

+ 6 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -1494,7 +1494,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 			}else{
 				csStudentIds = courseStudentIdsMap.get(cs.getId());
 			}
-			repeatStudentIds = csStudentIds.stream().filter(id -> currentCourseStudentIds.contains(id)).collect(Collectors.toSet());
+			if(null!=csStudentIds){
+				repeatStudentIds = csStudentIds.stream().filter(id -> currentCourseStudentIds.contains(id)).collect(Collectors.toSet());
+			}
 
 			Set<Integer> csTeacherIds = courseTeacherIdsMap.get(cs.getId());
 			Set<Integer> repeatTeacherIds = new HashSet<>();
@@ -1522,7 +1524,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				}else{
 					csStudentIds = courseStudentIdsMap.get(cs.getId());
 				}
-				repeatStudentIds = csStudentIds.stream().filter(id -> currentCourseStudentIds.contains(id)).collect(Collectors.toSet());
+				if(null!=csStudentIds){
+					repeatStudentIds = csStudentIds.stream().filter(id -> currentCourseStudentIds.contains(id)).collect(Collectors.toSet());
+				}
 
 				Set<Integer> csTeacherIds = courseTeacherIdsMap.get(cs.getId());
 				Set<Integer> repeatTeacherIds = new HashSet<>();