返回资源分类的资源数量

This commit is contained in:
none
2023-03-15 11:31:42 +08:00
parent cca6d050bc
commit 3b67766ab2
12 changed files with 116 additions and 20 deletions

View File

@@ -77,6 +77,8 @@ public class ResourceController {
HashMap<String, Object> data = new HashMap<>();
data.put("result", result);
data.put("category_count", resourceService.getCategoryCount(type));
data.put("pure_total", resourceService.total(type));
if (type.equals(BackendConstant.RESOURCE_TYPE_VIDEO)) {
List<ResourceVideo> resourceVideos = resourceVideoService.chunksByRids(result.getData().stream().map(Resource::getId).toList());