|
|
@ -361,6 +361,7 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public List<PersonalCenterStudentListVO> queryStudentList(String userId) { |
|
|
|
public List<PersonalCenterStudentListVO> queryStudentList(String userId) { |
|
|
|
LinkedHashSet<UmsStudentManage> umsStudentManageList = queryTeacherByStudentList(userId); |
|
|
|
LinkedHashSet<UmsStudentManage> umsStudentManageList = queryTeacherByStudentList(userId); |
|
|
|
|
|
|
|
System.out.println("1111111"+umsStudentManageList); |
|
|
|
List<PersonalCenterStudentListVO> personalCenterStudentListVOList = new ArrayList<>(); |
|
|
|
List<PersonalCenterStudentListVO> personalCenterStudentListVOList = new ArrayList<>(); |
|
|
|
PersonalCenterStudentListVO personalCenterStudentListVO = null; |
|
|
|
PersonalCenterStudentListVO personalCenterStudentListVO = null; |
|
|
|
for (UmsStudentManage umsStudentManage : umsStudentManageList) { |
|
|
|
for (UmsStudentManage umsStudentManage : umsStudentManageList) { |
|
|
@ -375,7 +376,7 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public LinkedHashSet<UmsStudentManage> queryTeacherByStudentList(String userId) { |
|
|
|
public LinkedHashSet<UmsStudentManage> queryTeacherByStudentList(String userId) { |
|
|
|
String roleId = umsUserMapper.getbyIdRoleId(userId); |
|
|
|
String roleId = umsUserMapper.getByIdRoleId(userId); |
|
|
|
CourseQuery courseQuery = new CourseQuery(); |
|
|
|
CourseQuery courseQuery = new CourseQuery(); |
|
|
|
courseQuery.setUserId(userId); |
|
|
|
courseQuery.setUserId(userId); |
|
|
|
LinkedHashSet<UmsStudentManage> umsStudentManageList = new LinkedHashSet<>(); |
|
|
|
LinkedHashSet<UmsStudentManage> umsStudentManageList = new LinkedHashSet<>(); |
|
|
@ -388,8 +389,10 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl |
|
|
|
List<CourseLearningRecord> courseLearningRecordList = new ArrayList<>(); |
|
|
|
List<CourseLearningRecord> courseLearningRecordList = new ArrayList<>(); |
|
|
|
for (StudentCourses studentUsername : studentUsernames) { |
|
|
|
for (StudentCourses studentUsername : studentUsernames) { |
|
|
|
CourseLearningRecord courseLearningRecord = courseLearningRecordMapper.selectNewRecord(String.valueOf(studentUsername.getStudent())); |
|
|
|
CourseLearningRecord courseLearningRecord = courseLearningRecordMapper.selectNewRecord(String.valueOf(studentUsername.getStudent())); |
|
|
|
|
|
|
|
if (courseLearningRecord != null){ |
|
|
|
courseLearningRecordList.add(courseLearningRecord); |
|
|
|
courseLearningRecordList.add(courseLearningRecord); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
courseLearningRecordList = courseLearningRecordList.stream().sorted(Comparator.comparing(CourseLearningRecord::getTimes).reversed()).collect(Collectors.toList()); |
|
|
|
courseLearningRecordList = courseLearningRecordList.stream().sorted(Comparator.comparing(CourseLearningRecord::getTimes).reversed()).collect(Collectors.toList()); |
|
|
|
for (CourseLearningRecord courseLearningRecord : courseLearningRecordList) { |
|
|
|
for (CourseLearningRecord courseLearningRecord : courseLearningRecordList) { |
|
|
|
UmsStudentManage umsStudentManage = umsStudentManageMapper.queryStudent(courseLearningRecord.getUserId()); |
|
|
|
UmsStudentManage umsStudentManage = umsStudentManageMapper.queryStudent(courseLearningRecord.getUserId()); |
|
|
|