From b5355b4ca6e72d4982eec8f3131d4d6e8663ed3d Mon Sep 17 00:00:00 2001 From: Alan <3052806735@qq.com> Date: Fri, 23 Aug 2024 11:27:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=94=A8=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=B7=B3=E8=BF=87=E6=97=A0=E6=95=88=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/courses/CoursesServiceImpl.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 ba71258..7c9a09e 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 @@ -720,8 +720,8 @@ public class CoursesServiceImpl extends ServiceImpl impl userReadMessageTimeVO.setReceiverName(student.getName()); userReadMessageTimeVOS.add(userReadMessageTimeVO); } else { - log.error("学生不存在: {}", sc.getStudent()); - throw new BusinessException(ErrorCode.PARAMS_USER_NOTEXISTS); + log.warn("学生不存在: {}", sc.getStudent()); + continue; } } } @@ -738,8 +738,8 @@ public class CoursesServiceImpl extends ServiceImpl impl userReadMessageTimeVO.setReceiverName(umsTeacher.getName()); userReadMessageTimeVOS.add(userReadMessageTimeVO); } else { - log.error("教师不存在: {}", teacherId); - throw new BusinessException(ErrorCode.PARAMS_USER_NOTEXISTS); + log.warn("教师不存在: {}", teacherId); + continue; } } @@ -819,8 +819,8 @@ public class CoursesServiceImpl extends ServiceImpl impl userReadMessageTimeVO.setReceiverName(umsTeacher.getName()); userReadMessageTimeVOS.add(userReadMessageTimeVO); } else { - log.error("教师不存在: {}", teacherId); - throw new BusinessException(ErrorCode.PARAMS_USER_NOTEXISTS); + log.warn("教师不存在: {}", teacherId); + continue; } } @@ -834,8 +834,8 @@ public class CoursesServiceImpl extends ServiceImpl impl userReadMessageTimeVO.setReceiverName(student.getName()); userReadMessageTimeVOS.add(userReadMessageTimeVO); } else { - log.error("学生不存在: {}", sc.getStudent()); - throw new BusinessException(ErrorCode.PARAMS_USER_NOTEXISTS); + log.warn("学生不存在: {}", sc.getStudent()); + continue; } } }