Browse Source

course not match with merchant_id

huodongdong 7 năm trước cách đây
mục cha
commit
9ae1591258

BIN
api/.DS_Store


+ 32 - 0
api/web/callback/event.md

@@ -0,0 +1,32 @@
+### /callback/event
+
+* method: PUT
+* version: v1.0
+* describe: 发送用户行为数据
+
+
+##### 参数说明
+| name | type | null | desc |
+|----|:-----|:-------|:------|
+| eventType | int | no | 事件类型,比如点击、观看、活跃时长等 |
+| tarName | string | no | 行为目标名|
+| tarId | string | yes | 行为目标id |
+| value | int | yes | 值 |
+
+
+##### 返回值
+| name | type | null | desc |
+|------|:-----|:-----|:-----|
+| code | int | no | 返回码 |
+| message | string | yes | 当code=200时值为空 |
+| success | bool | no | code=200 && success=true |
+
+
+##### type定义
+|value|desc|
+|-----|:---|
+| 10001 | 登录 |
+| 10002 | 退出 |
+| 10003 | 活跃 |
+| 20001 | 点击 |
+| 20002 | 观看 |

+ 1 - 0
db/lj_combo.md

@@ -12,6 +12,7 @@
 | cost_price | double(16,2) | no | 0 | 成本价 | |
 | sale_price | double(16,2) | no | 0 | 渠道价格 | |
 | market_price | double(16,2) | no | 0 | 终端价格 | |
+| sort | int | no | 0 | 排序字段 | |
 | status | smallint | no | | 状态 | |
 | create_time | smallint | no | now | 创建时间 | |
 | update_time | timestamp | no | now | 更新时间 | | |

+ 1 - 1
db/lj_course.md

@@ -8,7 +8,7 @@
 | cid | varchar(512) | no | | 课程编码 | uni |
 | name | varchar(1024) | yes | null | 课程名 | |
 | title | varchar(1024) | yes | null | 课程标题 | |
-| type | smallint | no | 0 | 课程类型 | |
+| type | smallint | no | 0 | 课程类型,是否为单元 | |
 | digest | text | yes | null | 课程摘要 | |
 | detail | text | yes | null | 课程简介 | |
 | keyword | varchar(1024) | yes | null | 课程关键字 | |

+ 1 - 3
db/lj_course_lesson_relation.md

@@ -7,9 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | cid | varchar(512) | no | | 课程编码 | |
 | lid | varchar(512) | no | | 课程编码 | |
-| merchant_id | bigint | no | | 渠道id | |
-| status | smallint | no | | 状态 | |
 | create_time | smallint | no | now | 创建时间 | | |
 
 ##### index
-> unique index on(cid, lid, merchant_id)
+> unique index on(cid, lid)

+ 1 - 2
db/lj_course_support_relation.md

@@ -7,8 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | cid | varchar(512) | no | | 课程编码 | |
 | sid | varchar(512) | no | | 周边编码 | |
-| merchant_id | bigint | no | | 渠道id | |
 | create_time | smallint | no | now | 创建时间 | | |
 
 ##### index
-> unique index on(cid, sid, merchant_id)
+> unique index on(cid, sid)

+ 1 - 3
db/lj_course_unit_relation.md

@@ -7,9 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | cid | varchar(512) | no | | 课程编码 | |
 | uid | varchar(512) | no | | 单元编码 | |
-| merchant_id | bigint | no | | 渠道id | |
-| status | smallint | no | | 状态 | |
 | create_time | smallint | no | now | 创建时间 | | |
 
 ##### index
-> unique index on(cid, uid, merchant_id)
+> unique index on(cid, uid)

+ 3 - 2
db/lj_item.md

@@ -5,15 +5,16 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| oid | varchar(512) | no | | 课程编码 | |
+| oid | varchar(512) | no | | 课程编码/周边编码 | |
 | type | smallint | no | | 商品类型, 课程/周边 | |
 | merchant_id | bigint | no | | 渠道id | |
 | cost_price | double(16,2) | no | 0 | 成本价 | |
 | sale_price | double(16,2) | no | 0 | 渠道价格 | |
 | market_price | double(16,2) | no | 0 | 终端价格 | |
+| sort | int | no | 0 | 排序字段 | |
 | status | smallint | no | | 状态 | |
 | create_time | smallint | no | now | 创建时间 | |
 | update_time | timestamp | no | now | 更新时间 | | |
 
 ##### index
-> unique index (cid, merchant_id)
+> unique index (oid, merchant_id)

+ 13 - 0
db/lj_item_tag_relation.md

@@ -0,0 +1,13 @@
+### lj_item_tag_relation table structure
+> 此表为课程或周边与标签的对应关系
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| tag_id | bigint | no | | 标签id | |
+| item_id | varchar(512) | no | | 课程或周边id | |
+| create_time | timestamp | no | now | 创建时间 | | |
+
+##### index
+> unique index (tag_id, item_id)

+ 1 - 0
db/lj_lesson.md

@@ -8,6 +8,7 @@
 | lid | varchar(512) | no | | 课编码 | uni |
 | title | varchar(1024) | yes | null | 标题 | |
 | digest | text | yes | null | 课摘要 | |
+| sort | int | no |  | tag排序 | |
 | status | smallint | no | | 状态 | |
 | create_time | smallint | no | now | 创建时间 | |
 | update_time | timestamp | no | now | 更新时间 | |

+ 1 - 2
db/lj_lesson_ware_relation.md

@@ -7,8 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | lid | varchar(512) | no | | 课编码 | |
 | wid | varchar(512) | no | | 课件编码 | |
-| merchant_id | bigint | no | | 渠道id | |
 | create_time | timestamp | no | now | 创建时间 | | |
 
 ##### index
-> unique index on(lid, wid, merchant_id)
+> unique index on(lid, wid)

+ 1 - 2
db/lj_support_circle_relation.md

@@ -7,8 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | fid | varchar(512) | no | | 课程编码 | |
 | tid | varchar(512) | no | | 课程编码 | |
-| merchant_id | bigint | no | | 渠道id | |
 | create_time | smallint | no | now | 创建时间 | | |
 
 ##### index
-> unique index on(fid, tid, merchant_id)
+> unique index on(fid, tid)

+ 15 - 0
db/lj_tag.md

@@ -0,0 +1,15 @@
+### lj_tag table structure
+> 此表为课程及周边标签的分类
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| name | varchar(256) | no | | 名字 | |
+| sort | int | no |  | tag排序 | |
+| status | smallint | no | | 状态 | |
+| create_time | timestamp | no | now | 创建时间 | |
+| update_time | timestamp | no | now | 更新时间 | | |
+
+##### index
+> unique index (name)

+ 1 - 0
db/lj_unit.md

@@ -8,6 +8,7 @@
 | uid | varchar(512) | no | | 单元编码 | uni |
 | title | varchar(1024) | yes | null | 单元标题 | |
 | digest | text | yes | null | 单元摘要 | |
+| sort | int | no |  | 排序 | |
 | status | smallint | no | | 状态 | |
 | create_time | smallint | no | now | 创建时间 | |
 | update_time | timestamp | no | now | 更新时间 | | |

+ 1 - 2
db/lj_unit_lesson_relation.md

@@ -7,8 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | uid | varchar(512) | no | | 单元编码 | |
 | lid | varchar(512) | no | | 课程编码 | |
-| merchant_id | bigint | no | | 渠道id | |
 | create_time | smallint | no | now | 创建时间 | | |
 
 ##### index
-> unique index on(uid, lid, merchant_id)
+> unique index on(uid, lid)

+ 1 - 0
db/lj_ware.md

@@ -9,6 +9,7 @@
 | title | varchar(1024) | yes | null | 课件标题 | |
 | digest | text | yes | null | 课件摘要 | |
 | type | smallint | no | | 类型 | |
+| sort | int | no | 0 | 排序 | |
 | status | smallint | no | | 状态 | |
 | create_time | timestamp | no | now | 创建时间 | |
 | update_time | timestamp | no | now | 更新时间 | | |