mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-24 19:59:31 +08:00
删除资源分类的资源数量计算
This commit is contained in:
@@ -112,13 +112,6 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource> i
|
||||
return list(query().getWrapper().in("id", ids).select(fields));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, Integer> getCategoryCount(String type) {
|
||||
Map<Integer, Integer> data = getBaseMapper().getCategoryCount(type).stream().collect(Collectors.toMap(ResourceCategoryCountMapper::getCid, ResourceCategoryCountMapper::getTotal));
|
||||
data.put(0, getBaseMapper().getNunCategoryCount(type));
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer total(String type) {
|
||||
return Math.toIntExact(count(query().getWrapper().eq("type", type).eq("is_hidden", 0)));
|
||||
|
||||
Reference in New Issue
Block a user