feat(admin): 将用户管理的用量统计改为全量累计口径 (#314)

- 新增按用户 ID 批量汇总 usage 的后端查询
- 在 /api/admin/users 中返回 request_count 和 total_tokens
- 移除用户管理页面额外的 usage 聚合请求
- 为管理端用户列表补充累计统计回归测试
This commit is contained in:
AAEE86
2026-04-19 01:26:22 +08:00
committed by GitHub
parent ab54881eb0
commit 6666992d01
12 changed files with 273 additions and 71 deletions

View File

@@ -15,6 +15,8 @@ export interface User {
created_at: string
updated_at?: string
last_login_at?: string | null
request_count?: number
total_tokens?: number
}
export interface CreateUserRequest {