新增后台学员的全部线上课进度api

This commit is contained in:
none
2023-04-24 10:49:52 +08:00
parent 51e077afb9
commit abf6a36c4f
4 changed files with 66 additions and 1 deletions

View File

@@ -64,4 +64,6 @@ public interface DepartmentService extends IService<Department> {
Long total();
Map<Integer, Integer> getDepartmentsUserCount();
List<Department> chunk(List<Integer> ids);
}

View File

@@ -214,6 +214,9 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
@Override
public List<Course> getDepCoursesAndShow(List<Integer> depIds) {
if (depIds == null || depIds.size() == 0) {
return new ArrayList<>();
}
List<Integer> courseIds = courseDepartmentService.getCourseIdsByDepIds(depIds);
if (courseIds == null || courseIds.size() == 0) {
return new ArrayList<>();

View File

@@ -268,4 +268,12 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
DepartmentsUserCountMapRes::getDepId,
DepartmentsUserCountMapRes::getTotal));
}
@Override
public List<Department> chunk(List<Integer> ids) {
if (ids == null || ids.size() == 0) {
return new ArrayList<>();
}
return list(query().getWrapper().in("id", ids));
}
}