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; } } }