mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-24 11:49:51 +08:00
优化学员最近学习记录api
This commit is contained in:
@@ -99,6 +99,11 @@ public class CourseHourServiceImpl extends ServiceImpl<CourseHourMapper, CourseH
|
||||
public List<Integer> getRidsByCourseId(Integer courseId, String type) {
|
||||
return list(query().getWrapper().eq("course_id", courseId).eq("type", type)).stream().map(CourseHour::getRid).toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CourseHour> chunk(List<Integer> hourIds) {
|
||||
return list(query().getWrapper().in("id", hourIds));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -90,8 +90,8 @@ public class UserCourseHourRecordServiceImpl extends ServiceImpl<UserCourseHourR
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> getLatestCourseIds(Integer userId, Integer size) {
|
||||
return getBaseMapper().getLatestCourseIds(userId, size);
|
||||
public List<UserCourseHourRecord> getLatestCourseIds(Integer userId, Integer size) {
|
||||
return getBaseMapper().getUserLatestRecords(userId, size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user