@Override
  public Set<StudentUser> getMajorUserListByUsercommon(Long id) throws Exception {

    StudentUser studentUser = studentUserDao.getStudentUserByUserCommon(id);
    if (studentUser != null) {
      Major major = studentUser.getMajor();
      if (major != null) {
        Set<StudentUser> studentUsers = studentUserDao.getListByMajor(major.getId());
        return studentUsers;
      } else {
        return null;
      }
    } else {
      return null;
    }
  }
 @Override
 public Set<StudentUser> getMajorUserListByTeacher(Long id) throws Exception {
   Set<StudentUser> studentUsers = new HashSet<StudentUser>();
   TeacherUser teacherUser = teacherUserDao.getTeacherUserByUserId(id);
   if (teacherUser != null) {
     List<Classes> classes = teacherUser.getClasses();
     for (Classes c : classes) {
       Set<StudentUser> listSet = studentUserDao.getListByClasses(c.getId());
       studentUsers.addAll(listSet);
     }
   }
   return studentUsers;
 }