diff --git a/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java index 313b3aa..7d5eab9 100644 --- a/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java @@ -417,7 +417,9 @@ public class CoursesServiceImpl extends ServiceImpl impl List studentUsernames = studentCoursesMapper.selectBatchSomeStudent(courseId); for (StudentCourses studentUsername : studentUsernames) { UmsStudentManage umsStudentManage = umsStudentManageMapper.queryStudent(String.valueOf(studentUsername.getStudent())); - umsStudentManageList.add(umsStudentManage); + if (umsStudentManage != null){ + umsStudentManageList.add(umsStudentManage); + } } } return umsStudentManageList;