forked from wangziqi/gongxue-base
feat: import scorelines and videos
This commit is contained in:
@@ -685,6 +685,46 @@ content_entries
|
||||
- 教师可以为范围内学生创建备注和跟进任务,但是否能禁用学生、批量导入、查看手机号由后端权限和字段权限决定;前端只按返回值渲染。
|
||||
- H5 自定义域名下要注意缓存隔离,不能把 A 租户主题缓存用到 B 租户。
|
||||
|
||||
## 租户内容导入对接
|
||||
|
||||
租户后台导入统一使用 preview -> issues -> import 流程,前端不要直接写 Supabase 表或绕过 `apps/api`。
|
||||
|
||||
当前可联调:
|
||||
|
||||
```text
|
||||
POST /api/tenant-content/imports/preview/questions
|
||||
POST /api/tenant-content/imports/questions
|
||||
POST /api/tenant-content/imports/preview/vocabulary
|
||||
POST /api/tenant-content/imports/vocabulary
|
||||
POST /api/tenant-content/imports/preview/handbook
|
||||
POST /api/tenant-content/imports/handbook
|
||||
POST /api/tenant-content/imports/preview/scoreline
|
||||
POST /api/tenant-content/imports/scoreline
|
||||
POST /api/tenant-content/imports/preview/videos
|
||||
POST /api/tenant-content/imports/videos
|
||||
GET /api/tenant-content/imports
|
||||
GET /api/tenant-content/imports/issues
|
||||
```
|
||||
|
||||
前端流程:
|
||||
|
||||
1. 上传或粘贴 JSON,先调用对应 preview。
|
||||
2. 展示 `job.totalCount/validCount/errorCount/warningCount`。
|
||||
3. 展示逐行 `issues`,错误行必须让运营修正;如果后端允许 `allowPartial`,也要二次确认。
|
||||
4. 用户确认后调用 import;导入完成后刷新内容列表、分数线列表或题目视频列表。
|
||||
|
||||
分数线导入前端注意:
|
||||
|
||||
- 后端支持 `fields/schools/majors/records` 分桶,也支持 `items` 列表。
|
||||
- 页面筛选字段仍以 `/api/scoreline/fields` 为准,不要从导入 JSON 临时生成筛选 UI。
|
||||
- `record` 至少需要 `schoolId`、`schoolLegacyId` 或 `schoolName`,否则 preview 会返回 issue。
|
||||
|
||||
视频导入前端注意:
|
||||
|
||||
- 列表和搜索接口不会给付费视频可播放 URL;播放统一调 `POST /api/videos/play`。
|
||||
- 绑定题目必须提供 `questionId` 或 `legacyQuestionId`。
|
||||
- 生产建议把私有视频先入 `content_assets`,导入时传 `assetId`,避免长期暴露源站 URL。
|
||||
|
||||
## 公共题库采纳对接
|
||||
|
||||
平台超级管理员后台使用:
|
||||
@@ -1015,7 +1055,7 @@ ACTIVATION_CODE_REGION_MISMATCH
|
||||
- 角色模板:`GET/PUT /api/tenant-admin/role-templates`、`POST /api/tenant-admin/role-templates/disable`
|
||||
- 内容入口/分类树/题目集合/练习蓝图
|
||||
- 题目/单词/知识手册/分数线/视频维护
|
||||
- JSON 导入 preview/import/issues
|
||||
- 题目/单词/知识手册/分数线/视频 JSON 导入 preview/import/issues
|
||||
- Banner/FAQ/公告/激活码/优惠券
|
||||
- 考试日期:`GET/PUT /api/tenant-admin/exam-dates`
|
||||
- 题目反馈:`GET /api/tenant-admin/feedbacks`、`POST /api/tenant-admin/feedbacks/status`、`GET /api/tenant-admin/feedbacks/events`
|
||||
|
||||
Reference in New Issue
Block a user