Files
tiku-backend.net/docs/migration/phase-7-student-experience-and-content-consumption.md

55 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 第七阶段:学生端体验与内容消费闭环
状态:已完成。
## 目标
- 补齐学生端视频消费、Profile 签到、积分流水和内容导入异步化。
- 不实现 AI 业务功能AI 进入第八阶段。
## 结果
学生端视频接口:
- `GET /api/videos/search`
- `POST /api/videos/play`
- `POST /api/videos/progress`
- `GET /api/questions/videos`
- `POST /api/questions/videos/batch`
Profile 与积分接口:
- `POST /api/profile/check-in`
- `GET /api/profile/score-events`
内容导入入口:
- `POST /api/tenant-content/imports/preview/{importType}`
- `POST /api/tenant-content/imports/{importType}`
- `GET /api/tenant-content/imports/detail`
## 边界
- 播放接口不暴露 OSS bucket、真实 object key 或 provider 细节。
- 公共题和租户私题关联视频都必须按当前租户可见性校验。
- 播放进度按租户、用户、视频、题目维度幂等更新。
- 签到复用积分任务和积分流水;同一用户、同一租户、同一天只能成功一次。
- `questions``vocabulary``handbook``scoreline``videos` 导入语义统一映射为 `importType`
- 大批量导入创建 `content_import` 后台任务Worker 使用 `ITenantExecutionScope` 执行。
- 本阶段未实现 `/api/ai/**`。SK 包和 AI provider 边界在第八阶段引入。
## 旧接口替代
- `/api/profile/activity-tasks` -> `/api/points/tasks`
- `/api/profile/exchange-items` -> `/api/points/exchange-items`
- `/api/profile/exchange-items/redeem` -> `/api/points/exchange-orders`
## 验收
- 租户 A 不能播放租户 B 视频。
- 公共题和租户私题解析视频都按权限返回。
- 播放进度重复上报不产生重复记录。
- 每日签到同一天只能成功一次。
- 签到、积分任务和兑换产生可查询积分流水。
- 异步导入创建 `content_import` jobWorker 成功写入结果。