查询用户信息跳过无效用户

master
Alan 3 months ago
parent 42eecfa10f
commit b5355b4ca6
  1. 16
      src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java

@ -720,8 +720,8 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl
userReadMessageTimeVO.setReceiverName(student.getName()); userReadMessageTimeVO.setReceiverName(student.getName());
userReadMessageTimeVOS.add(userReadMessageTimeVO); userReadMessageTimeVOS.add(userReadMessageTimeVO);
} else { } else {
log.error("学生不存在: {}", sc.getStudent()); log.warn("学生不存在: {}", sc.getStudent());
throw new BusinessException(ErrorCode.PARAMS_USER_NOTEXISTS); continue;
} }
} }
} }
@ -738,8 +738,8 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl
userReadMessageTimeVO.setReceiverName(umsTeacher.getName()); userReadMessageTimeVO.setReceiverName(umsTeacher.getName());
userReadMessageTimeVOS.add(userReadMessageTimeVO); userReadMessageTimeVOS.add(userReadMessageTimeVO);
} else { } else {
log.error("教师不存在: {}", teacherId); log.warn("教师不存在: {}", teacherId);
throw new BusinessException(ErrorCode.PARAMS_USER_NOTEXISTS); continue;
} }
} }
@ -819,8 +819,8 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl
userReadMessageTimeVO.setReceiverName(umsTeacher.getName()); userReadMessageTimeVO.setReceiverName(umsTeacher.getName());
userReadMessageTimeVOS.add(userReadMessageTimeVO); userReadMessageTimeVOS.add(userReadMessageTimeVO);
} else { } else {
log.error("教师不存在: {}", teacherId); log.warn("教师不存在: {}", teacherId);
throw new BusinessException(ErrorCode.PARAMS_USER_NOTEXISTS); continue;
} }
} }
@ -834,8 +834,8 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl
userReadMessageTimeVO.setReceiverName(student.getName()); userReadMessageTimeVO.setReceiverName(student.getName());
userReadMessageTimeVOS.add(userReadMessageTimeVO); userReadMessageTimeVOS.add(userReadMessageTimeVO);
} else { } else {
log.error("学生不存在: {}", sc.getStudent()); log.warn("学生不存在: {}", sc.getStudent());
throw new BusinessException(ErrorCode.PARAMS_USER_NOTEXISTS); continue;
} }
} }
} }

Loading…
Cancel
Save