From ce9cc317365bddd3cc79c11f0a9f85633525d381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=80=BB=E8=A3=81?= <14186472+wenyu441069198@user.noreply.gitee.com> Date: Mon, 12 Aug 2024 22:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=82=96=E6=B5=B7=E5=8D=97=E6=9F=A5=E8=80=81?= =?UTF-8?q?=E5=B8=88=E6=89=80=E6=95=99=E7=9A=84=E5=AD=A6=E7=94=9F=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/service/impl/courses/CoursesServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;