H0-10 存储空间统计 + 学习资产计数接口 #55

Open
opened 2026-05-29 19:19:01 +08:00 by wangdl · 1 comment
Owner

目标

新增存储空间和学习资产统计接口,支撑 iOS「我的页面」。

背景说明

iOS 文档要求展示:存储空间(云端/文件占用/剩余)、学习资产(知识库数/资料数/知识点数/复习卡数)。当前无统计接口。

模块职责

1. GET /users/me/storage

{
  "totalBytes": 1073741824,
  "usedBytes": 52428800,
  "fileCount": 12
}

2. GET /users/me/assets-summary

{
  "knowledgeBaseCount": 3,
  "knowledgeItemCount": 45,
  "reviewCardCount": 120
}

禁止事项

  • 存储上限暂时硬编码(1GB),后续连会员计划
## 目标 新增存储空间和学习资产统计接口,支撑 iOS「我的页面」。 ## 背景说明 iOS 文档要求展示:存储空间(云端/文件占用/剩余)、学习资产(知识库数/资料数/知识点数/复习卡数)。当前无统计接口。 ## 模块职责 ### 1. GET /users/me/storage ```json { "totalBytes": 1073741824, "usedBytes": 52428800, "fileCount": 12 } ``` ### 2. GET /users/me/assets-summary ```json { "knowledgeBaseCount": 3, "knowledgeItemCount": 45, "reviewCardCount": 120 } ``` ## 禁止事项 - 存储上限暂时硬编码(1GB),后续连会员计划
wangdl added this to the H0:iOS 对接阻断修复(P0) milestone 2026-05-29 19:19:01 +08:00
Author
Owner

H0-10 修复完成

新增 API

方法 路径 说明
GET /users/me/storage 存储空间统计(totalBytes/usedBytes/fileCount)
GET /users/me/assets-summary 学习资产摘要(kbCount/itemCount/cardCount)

实现

  • storage:聚合 UploadedFile 表中当前用户的 sizeBytes
  • assets-summary:分别 count KnowledgeBase/KnowledgeItem/ReviewCard
  • 存储上限暂时硬编码 1GB,后续连会员计划
## ✅ H0-10 修复完成 ### 新增 API | 方法 | 路径 | 说明 | |------|------|------| | GET | /users/me/storage | 存储空间统计(totalBytes/usedBytes/fileCount) | | GET | /users/me/assets-summary | 学习资产摘要(kbCount/itemCount/cardCount) | ### 实现 - storage:聚合 UploadedFile 表中当前用户的 sizeBytes - assets-summary:分别 count KnowledgeBase/KnowledgeItem/ReviewCard - 存储上限暂时硬编码 1GB,后续连会员计划
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/api-server#55
No description provided.