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

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());
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<CoursesMapper, Courses> 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<CoursesMapper, Courses> 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<CoursesMapper, Courses> 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;
}
}
}

Loading…
Cancel
Save