mirror of
https://github.com/PlayEdu/PlayEdu
synced 2026-02-25 16:36:21 +08:00
首页增加课件数
This commit is contained in:
@@ -59,4 +59,6 @@ public interface ResourceService extends IService<Resource> {
|
||||
void updateNameAndCategoryId(Integer id, String name, Integer categoryId);
|
||||
|
||||
List<Integer> categoryIds(Integer resourceId);
|
||||
|
||||
Integer total(List<String> types);
|
||||
}
|
||||
|
||||
@@ -186,4 +186,9 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource>
|
||||
.map(ResourceCategory::getCid)
|
||||
.toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer total(List<String> types) {
|
||||
return Math.toIntExact(count(query().getWrapper().in("type", types).eq("is_hidden", 0)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user