mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-22 18:29:51 +08:00
added: 学员,我的课程
This commit is contained in:
@@ -47,4 +47,8 @@ public interface CourseService extends IService<Course> {
|
||||
Map<Integer, Integer> getCategoryCount();
|
||||
|
||||
Integer total();
|
||||
|
||||
List<Course> openCoursesAndShow(Integer limit);
|
||||
|
||||
List<Course> depCoursesAndShow(List<Integer> depIds);
|
||||
}
|
||||
|
||||
@@ -174,6 +174,16 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
||||
public Integer total() {
|
||||
return Math.toIntExact(count());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Course> openCoursesAndShow(Integer limit) {
|
||||
return getBaseMapper().openCoursesAndShow(limit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Course> depCoursesAndShow(List<Integer> depIds) {
|
||||
return list(query().getWrapper().in("id", courseDepartmentService.getCourseIdsByDepIds(depIds)).eq("is_show", 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user