bstcine / cine-tasklist

8 stars 0 forks source link

API-学习系统: Lesson播放页-记录用户在每个课程上的实际学习情况 #386

Closed joelin109 closed 6 years ago

joelin109 commented 6 years ago

需要跟踪记录的信息

1.* : 线上已经在记录的数据
2.*:本次希望记录的数据

列名: lesson_id > course_id content_id > lesson_id


<br>
<br>

#### [更新学习状态API](https://github.com/bstcine/cine.api/blob/master/V2.0/update_learn_status.md)
> /api/user/content/course/updateLearnStatus 更新学习状态
#### param

{ "token":"xTvcFJec", "sitecode": "cine.ios.iphone", "channel": "i5", "locale": "zh_CN", "appver": "2.4.0", "data":{ "cid":"42", "lesson_id":"1315", //新增 替换 content_id "status":1, "last_tag":3, "last_media_id": 'xxxxxxxxxxxxxxxx', //新增 "last_position":1512, "learn_duration":123, //新增 实际播放时长 秒 "content_id":"1315", //待删除 "duration":123, //待删除 } }

joelin109 commented 6 years ago

459

460

kimliss commented 6 years ago

Run SQL - 课程学习播放记录

kimliss commented 6 years ago

1. Run SQL - 表规范

RENAME TABLE t_lessonlearndetail TO stats_lesson_learn_detail; ALTER TABLE stats_lesson_learn_detail CHANGE COLUMN lesson_id course_id varchar(30) NOT NULL COMMENT '课程id'; ALTER TABLE stats_lesson_learn_detail CHANGE COLUMN content_id lesson_id varchar(30) NOT NULL COMMENT '当前正在学习的课内容ID';


# 2. Run SQL - 纪录 Lesson 下 每个 tag 的时间
- [ ] Dev
``` sql
alter table stats_lesson_learn_detail
add column `learn_duration` int(11) NOT NULL DEFAULT 0 COMMENT '累计学习时长';