课程列表api && 部门课程api

This commit is contained in:
none
2023-03-13 17:30:19 +08:00
parent fd07672154
commit 0ebb278f42
5 changed files with 58 additions and 10 deletions

View File

@@ -40,4 +40,6 @@ public interface CourseService extends IService<Course> {
void removeCategoryIdRelate(Integer categoryId);
List<Course> chunks(List<Integer> ids, List<String> fields);
List<Course> chunks(List<Integer> ids);
}

View File

@@ -61,6 +61,9 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
}
wrapper.in("id", courseIds);
}
if (filter.getIsShow() != null) {
wrapper.eq("is_show", filter.getIsShow());
}
String sortFiled = filter.getSortField();
if (sortFiled == null || sortFiled.trim().length() == 0) {
@@ -198,6 +201,11 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
public List<Course> chunks(List<Integer> ids, List<String> fields) {
return list(query().getWrapper().in("id", ids).select(fields));
}
@Override
public List<Course> chunks(List<Integer> ids) {
return list(query().getWrapper().in("id", ids));
}
}