|
|
@ -381,15 +381,13 @@ public class UmsUserServiceImpl extends ServiceImpl<UmsUserMapper, UmsUser> impl |
|
|
|
} |
|
|
|
} |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public List<TeacherInfVO> getTeacherInfList() { |
|
|
|
public List<TeacherInfVO> getTeacherInfList() { |
|
|
|
List<UmsUser> umsUserTeachers = query().eq("role_id", TEACHER_ROLE).list(); |
|
|
|
List<UmsTeacher> umsTeachers = umsTeacherMapper.selectList(new LambdaQueryWrapper<>(UmsTeacher.class)); |
|
|
|
TeacherInfVO teacherInfVO = null; |
|
|
|
TeacherInfVO teacherInfVO = null; |
|
|
|
List<TeacherInfVO> teacherInfList = new ArrayList<>(); |
|
|
|
List<TeacherInfVO> teacherInfList = new ArrayList<>(); |
|
|
|
for (UmsUser umsUserTeacher : umsUserTeachers) { |
|
|
|
for (UmsTeacher umsTeacher : umsTeachers) { |
|
|
|
teacherInfVO = new TeacherInfVO(); |
|
|
|
teacherInfVO = new TeacherInfVO(); |
|
|
|
String teacherName = umsTeacherMapper.selectOne(new LambdaQueryWrapper<>(UmsTeacher.class) |
|
|
|
teacherInfVO.setName(umsTeacher.getName()); |
|
|
|
.eq(UmsTeacher::getUserId, umsUserTeacher.getId())).getName(); |
|
|
|
teacherInfVO.setUserId(umsTeacher.getUserId()); |
|
|
|
teacherInfVO.setName(teacherName); |
|
|
|
|
|
|
|
teacherInfVO.setUserId(umsUserTeacher.getId()); |
|
|
|
|
|
|
|
teacherInfList.add(teacherInfVO); |
|
|
|
teacherInfList.add(teacherInfVO); |
|
|
|
} |
|
|
|
} |
|
|
|
return teacherInfList; |
|
|
|
return teacherInfList; |
|
|
|