|
|
|
@ -360,8 +360,7 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<PersonalCenterStudentListVO> queryStudentList(String userId) { |
|
|
|
|
LinkedHashSet<UmsStudentManage> umsStudentManageList = queryTeacherByStudentList(userId); |
|
|
|
|
System.out.println("1111111"+umsStudentManageList); |
|
|
|
|
LinkedHashSet<UmsStudentManage> umsStudentManageList = queryTeacherByStudentLearningRecordList(userId); |
|
|
|
|
List<PersonalCenterStudentListVO> personalCenterStudentListVOList = new ArrayList<>(); |
|
|
|
|
PersonalCenterStudentListVO personalCenterStudentListVO = null; |
|
|
|
|
for (UmsStudentManage umsStudentManage : umsStudentManageList) { |
|
|
|
@ -375,7 +374,7 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public LinkedHashSet<UmsStudentManage> queryTeacherByStudentList(String userId) { |
|
|
|
|
public LinkedHashSet<UmsStudentManage> queryTeacherByStudentLearningRecordList(String userId) { |
|
|
|
|
String roleId = umsUserMapper.getByIdRoleId(userId); |
|
|
|
|
CourseQuery courseQuery = new CourseQuery(); |
|
|
|
|
courseQuery.setUserId(userId); |
|
|
|
@ -404,7 +403,27 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl |
|
|
|
|
throw new BusinessException(400,"只有老师才有此功能"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public LinkedHashSet<UmsStudentManage> queryTeacherByStudentList(String userId) { |
|
|
|
|
String roleId = umsUserMapper.getByIdRoleId(userId); |
|
|
|
|
CourseQuery courseQuery = new CourseQuery(); |
|
|
|
|
courseQuery.setUserId(userId); |
|
|
|
|
LinkedHashSet<UmsStudentManage> umsStudentManageList = new LinkedHashSet<>(); |
|
|
|
|
if (roleId.equals("1")){ |
|
|
|
|
PageDTO<CoursesVO> queryCourses = queryCourses(courseQuery); |
|
|
|
|
List<CoursesVO> coursesList = queryCourses.getList(); |
|
|
|
|
List<String> courseIds = coursesList.stream().map(CoursesVO::getId).collect(Collectors.toList()); |
|
|
|
|
for (String courseId : courseIds) { |
|
|
|
|
List<StudentCourses> studentUsernames = studentCoursesMapper.selectBatchSomeStudent(courseId); |
|
|
|
|
for (StudentCourses studentUsername : studentUsernames) { |
|
|
|
|
UmsStudentManage umsStudentManage = umsStudentManageMapper.queryStudent(String.valueOf(studentUsername.getStudent())); |
|
|
|
|
umsStudentManageList.add(umsStudentManage); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return umsStudentManageList; |
|
|
|
|
} |
|
|
|
|
throw new BusinessException(400,"只有老师才有此功能"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<CoursesVO> getPagePageSize(int page, int pageSize) { |
|
|
|
|