refactor(app): 观看历史统一分页契约并移除 limit

This commit is contained in:
Zhou Weidong authored and trae-solo-agent committed 2026-10-22 13:21:07 +08:00
1 parent 7b694938c6
commit c5468a669b
5 files changed
+19 -34

No files matched your search

+2 -7
View File
@@ -291,7 +291,6 @@ app.register.max-per-device-per-day
| POST | `/app/watch/progress` | 上报进度(建议每 10s 一次,切集时补一次) |
| GET | `/app/watch/progress?dramaId=` | 某剧续看位置 |
| GET | `/app/watch/recent` | 最近观看分页;`pageIndex` 默认 1,`pageSize` 默认 20、上限 100 |
| GET | `/app/watch/recent?limit=20` | 旧版最近观看 List 响应,仅保留一版兼容 |
| DELETE | `/app/watch/progress/{dramaId}` | 删除某剧记录 |
| DELETE | `/app/watch/progress` | 清空记录 |
| POST | `/app/favorites/toggle` | 收藏/取消收藏,返回切换后状态 |
@@ -341,7 +340,6 @@ app.register.max-per-device-per-day
| --- | --- | --- | --- | --- |
| `pageIndex` | int | 否 | 1 | 页码,小于 1 按 1 处理 |
| `pageSize` | int | 否 | 20 | 每页数量,上限 100,小于 1 按 1 处理 |
| `limit` | int | 否 | 无 | 兼容旧版;只要传该参数就返回 List,不再返回 PageResult |
分页响应 `data` 为 `PageResult<ProgressRespVO>`:
@@ -366,8 +364,8 @@ app.register.max-per-device-per-day
}
```
排序固定为 `updated_at DESC, drama_id DESC`。每页记录通过批量 IN 查询装配短剧和分集,
不逐条访问数据库。
排序固定为 `updated_at DESC, id DESC`。每页记录通过批量 IN 查询装配短剧和分集,
不逐条访问数据库。越界页返回空 `list` 且 `total` 保持正确。
`ProgressRespVO` 展示字段:
@@ -378,9 +376,6 @@ app.register.max-per-device-per-day
| `episodeNumber` | int / null | 当前续看集号 `ep_no` |
| `totalEpisodes` | int / null | 短剧总集数 |
旧兼容请求 `GET /app/watch/recent?limit=20` 的 `data` 仍为 `List<ProgressRespVO>`,
行为在本版本保留;新客户端应使用分页响应。
### 1.6 离线下载(已实现)
服务端只发**授权**与**短时效地址**,分片由客户端直接向 CDN 拉取 ——