|
|
|
@ -127,7 +127,7 @@ public class CourseLearningRecordServiceImpl extends ServiceImpl<CourseLearningR |
|
|
|
|
String roleId = umsUserMapper.getByIdRoleId(userId); |
|
|
|
|
List<Courses> coursesList = new ArrayList<>(); |
|
|
|
|
if (roleId.equals("1")){ |
|
|
|
|
List<String> courseIds = courseLearningRecordMapper.selectMaxNumber(); |
|
|
|
|
List<String> courseIds = courseLearningRecordMapper.selectMaxNumber(userId); |
|
|
|
|
for (String courseId : courseIds) { |
|
|
|
|
Courses courses = coursesMapper.selectById(courseId); |
|
|
|
|
coursesList.add(courses); |
|
|
|
@ -149,18 +149,15 @@ public class CourseLearningRecordServiceImpl extends ServiceImpl<CourseLearningR |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<CoursesVO> queryrecommendCourses(String userId) { |
|
|
|
|
String roleId = umsUserMapper.getByIdRoleId(userId); |
|
|
|
|
|
|
|
|
|
if (roleId.equals("1")) { |
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
|
} else if (roleId.equals("2")) { |
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
|
}else { |
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
|
List<Courses> coursesList = new ArrayList<>(); |
|
|
|
|
List<String> courseIds = courseLearningRecordMapper.selectMaxNumber(userId); |
|
|
|
|
for (String courseId : courseIds) { |
|
|
|
|
Courses courses = coursesMapper.selectById(courseId); |
|
|
|
|
if (courses != null){ |
|
|
|
|
coursesList.add(courses); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
List<CoursesVO> coursesVOList = BeanUtil.copyToList(coursesList, CoursesVO.class); |
|
|
|
|
return coursesVOList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|