修改老师端单点登录

newBigdata
xiaoCJ 10 months ago
parent 3bd37d8433
commit b994abe22f

@ -61,7 +61,8 @@ public class StuIndexController {
private StuTheoryExamMapper theoryExamMapper;
@Autowired
private TeaAndStudentExamMapper teaAndStudentExamMapper;
@Autowired
private StuClassMapper stuClassMapper;
@AnonymousAccess
@ApiOperation("课程数据展示")
@ -130,9 +131,13 @@ public class StuIndexController {
StuUser stuUser = stuUserMapper.selectByPrimaryKey(userId);
SysLoginLogExample sysLoginLogExample = new SysLoginLogExample();
sysLoginLogExample.createCriteria().andUseridEqualTo(stuUser.getUserid());
sysLoginLogExample.setOrderByClause("ORDER BY login_time desc");
List<SysLoginLog> sysLoginLogs = sysLoginLogMapper.selectByExample(sysLoginLogExample);
StuUserDto stuUserDto = new StuUserDto();
BeanUtils.copyProperties(stuUser, stuUserDto);
StuClass stuClass = stuClassMapper.selectByPrimaryKey(stuUser.getClassId());
stuUserDto.setClassName(stuClass.getClassName());
stuUserDto.setIpPlace(sysLoginLogs.get(0).getIpAddress());
stuUserDto.setLastIP(sysLoginLogs.get(0).getLoginIp());
return new ResultEntity<StuUserDto>(stuUserDto);

@ -321,44 +321,6 @@ public class TeaGradeManageController {
}
// private List<TeaExamAndUserDto> getTeaExamAndUserDtos(String schoolId, String keyWord, String classId, String examManageId) {
// List<TeaExamAndUserDto> list = new ArrayList<>();
// List<StuUser> stuUsers = userMapper.selectTeaExamAndUserDtos(schoolId, keyWord, classId, examManageId);
// //先拿到用户信息再用userid查学生分数
// for (StuUser stuUser : stuUsers) {
// TeaExamAndUserDto teaExamAndUserDto = new TeaExamAndUserDto();
// String userid = stuUser.getUserid();
// StuStudentExamExample studentExamExample = new StuStudentExamExample();
// StuStudentExamExample.Criteria studentExamCriteria = studentExamExample.createCriteria();
// studentExamCriteria.andUseridEqualTo(userid);
// teaExamAndUserDto.setName(stuUser.getName());
// teaExamAndUserDto.setStudentId(stuUser.getStudentId());
// StuClass stuClass = stuClassMapper.selectByPrimaryKey(stuUser.getClassId());
// teaExamAndUserDto.setClassName(stuClass.getClassName());
// if (StringUtils.isNotBlank(examManageId)) {
// studentExamCriteria.andExamManageIdEqualTo(examManageId);
// }
// List<StuStudentExamWithBLOBs> stuStudentExams = studentExamMapper.selectByExampleWithBLOBs(studentExamExample);
// if (!stuStudentExams.isEmpty()) {
// StuStudentExamWithBLOBs stuStudentExam = stuStudentExams.get(0);
// if (stuStudentExam != null) {
// if (stuStudentExam.getObjectiveScore() != null) {
// teaExamAndUserDto.setObjectiveScore(stuStudentExam.getObjectiveScore());
// }
// if (stuStudentExam.getCaseScore() != null) {
// teaExamAndUserDto.setCaseScore(stuStudentExam.getCaseScore());
// }
// if (stuStudentExam.getTotalScore() != null) {
// teaExamAndUserDto.setTotalScore(stuStudentExam.getTotalScore());
// }
// }
// }
// list.add(teaExamAndUserDto);
// }
// return list;
// }
private List<TeaExamAndUserDto> getTeaExamAndUserDtos(String schoolId, String keyWord, String classId, String examManageId) {
List<TeaExamAndUserDto> list = new ArrayList<>();

Loading…
Cancel
Save