Przeglądaj źródła

modified resource

huodongdong 7 lat temu
rodzic
commit
ce60c73f36

+ 48 - 42
api/cms/resource/resource_list.md

@@ -9,61 +9,67 @@
 |---- |:---|:---|:----:|
 | code | string | yes | 编码 |
 | name | string | yes | 名称 |
-| state | int | yes | 状态 |
-| type | int | no | 资源种类 |
-| sort | string | yes | 排序字段 |
-| by | int | yes | 1: ASC, -1: DESC |
+| type | int | no | 资源种类, 取值{0:video,1:audio,2:live,3:img} |
 | pageNo | int | yes | 页码 |
 | pageSize | int | yes | 页大小 |
 
 ##### 返回字段说明
 | name | type | desc |
 |------|:-----|:----:|
-| id | int | id |
+| id | string | id |
 | code | string | 编码 |
 | name | string | 名称 |
-| digest| string | 描述 |
-| tags | array | 标签名数组 |
-| url | string | 地址 |
-| cpId| int | 内容提供商id |
-| cpName| string | 内容提供商名字 |
-| state| int| 状态 |
-| gmtCreated|int | 创建时间 |
+| type | int | 类型 |
+| format | string | 资源格式 |
+| quality | string | 资源质量 |
+| rate | int | 资源码率 |
+| size | int | 资源大小 |
+| state| string | 状态 |
+| gmtCreated| int | 创建时间 |
 | gmtModified|int|修改时间|
 
 ##### 结果示例
 ```
 {
-  "code": "0000",
-  "message": '',
-  "data": {
-    "page": {
-      "pageNo": 0,
-      "pageSize": 10,
-      "hasNext": 1,
-      "hasPrev": 0,
-      "totalSize": 100,
-      "totalNo": 10,
-      "start": 20
+    "code": 200,
+    "success": true,
+    "message": null,
+    "data": {
+        "pageNo": 1,
+        "pageSize": 10,
+        "totalSize": 2,
+        "list": [
+            {
+                "id": "61cced1370874e60b14d47962712cb3a",
+                "code": "test-302",
+                "name": "test",
+                "type": 3,
+                "format": "jpg",
+                "quality": "low",
+                "size": 90,
+                "path": "/test/301",
+                "status": "NORMAL",
+                "gmtCreated": 1511264969000,
+                "gmtModified": 1511264969000,
+                "url": "http://efunimgs.oss-cn-beijing-internal.aliyuncs.com/resources//test/301"
+            },
+            {
+                "id": "707e9ade2df94e9494ab6bdf20dae669",
+                "code": "test-301",
+                "name": "test-301",
+                "type": 3,
+                "format": "jpg",
+                "quality": "low",
+                "size": 90,
+                "path": "/test/301",
+                "status": "NORMAL",
+                "gmtCreated": 1511264969000,
+                "gmtModified": 1511264969000,
+                "url": "http://efunimgs.oss-cn-beijing-internal.aliyuncs.com/resources//test/301"
+            }
+        ],
+        "start": 0,
+        "totalNo": 1
     }
-    "list": [
-      {
-        "id": 2,
-        "code": "K-001",
-        "name": "第一课",
-        "digest": "简介",
-        "tags": [
-          "哆啦A梦",
-          "动漫",
-          "幼儿启蒙"
-          ],
-        "url": "xxx",
-        "cpId": 123,
-        "state": 0,
-        "gmtCreated": "创建时间",
-        "gmtModified": "修改时间"
-      },
-      ...
-    ]
 }
 ```

+ 0 - 49
api/cms/resource/resource_one.md

@@ -1,49 +0,0 @@
-### GET /resource
-* method: GET
-* version: v1.0
-* describe: 获取资源
-
-##### 参数说明
-
-|name |type| null | desc |
-|---- |:---|:---|:----:|
-| code | string | no | 编码 |
-
-##### 返回字段说明
-| name | type | desc |
-|------|:-----|:----:|
-| id | int | id |
-| code | string | 编码 |
-| name | string | 名称 |
-| digest| string | 描述 |
-| tags | array | 标签名数组 |
-| url | string | 地址 |
-| cpId| int | 内容提供商id |
-| cpName| string | 内容提供商名字 |
-| state| int| 状态 |
-| gmtCreated|int | 创建时间 |
-| gmtModified|int|修改时间|
-
-##### 结果示例
-```
-{
-  "code": "0000",
-  "message": '',
-  "data": {
-    "id": 2,
-    "code": "K-001",
-    "name": "第一课",
-    "digest": "简介",
-    "tags": [
-      {12:'a'},
-      {22:'b'},
-      {23:'c'}
-      ],
-    "url": "xxx",
-    "cpId": 123,
-    "cpName": "鲨鱼公园",
-    "state": 0,
-    "gmtCreated": "创建时间",
-    "gmtModified": "修改时间"
-}
-```

+ 23 - 8
api/cms/resource/resource_save.md

@@ -1,24 +1,39 @@
 ### POST /resource
 * method: POST
 * version: v1.0
-* describe: 修改资源
+* describe: 创建资源
 
 ##### 参数说明
 | name | type | null| desc |
 |------|:-----|:----|:----:|
-| id | int | yes | id |
 | code | string | yes | 编码 |
 | name | string | no | 名称 |
-| digest| string | yes | 描述 |
-| tags | array | yes | 标签名数组 |
-| url | string | no | 地址 |
-| cpId| int | yes | 内容提供商id |
+| type| int | yes | 类型 |
+| format | string | yes | 格式 |
+| rate | int | yes |资源码率 |
+| size | int | yes |资源大小 |
+| path | string | no | 地址 |
 | state| int| yes | 状态|
 
 ##### 结果示例
 ```
 {
-  "code": "0000"
-  "message": "",
+    "code": 200,
+    "success": true,
+    "message": null,
+    "data": {
+        "id": "707e9ade2df94e9494ab6bdf20dae669",
+        "code": "test-301",
+        "name": "test-301",
+        "type": null,
+        "format": "jpg",
+        "quality": "low",
+        "size": 90,
+        "path": "/test/301",
+        "status": "NORMAL",
+        "gmtCreated": 1511264969000,
+        "gmtModified": 1511264969000,
+        "url": null
+    }
 }
 ```

+ 1 - 1
api/cms/ware/ware_list.md

@@ -22,7 +22,7 @@
 | id | int | 课件id |
 | code | string | 课件编码 |
 | name | string | 课件名称 |
-|digest| string | 课件描述 |
+| digest| string | 课件描述 |
 |type | int | 课件类型 |
 |tags | array | 标签名数组 |
 |playUrl| string | 播放地址 |

+ 4 - 5
db/product/lj_course.md

@@ -5,18 +5,17 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| c_code | varchar(512) | no | | 课程编码 | uni |
+| code | varchar(512) | no | | 课程编码 | uni |
 | name | varchar(1024) | yes | null | 课程名 | |
 | title | varchar(1024) | yes | null | 课程标题 | |
-| type | smallint | no | 0 | 课程类型,是否为单元 | |
 | digest | text | yes | null | 课程摘要 | |
 | detail | text | yes | null | 课程简介 | |
 | keyword | varchar(1024) | yes | null | 课程关键字 | |
-| cv_img_id | varchar(512) | yes | null | 封面图 | |
-| bg_img_id | varchar(512) | yes | null | 背景图 | |
+| cv_img_ids | varchar(512) | yes | null | 封面图 | |
+| bg_img_ids | varchar(512) | yes | null | 背景图 | |
 | status | smallint | no | | 状态 | |
 | gmt_created | smallint | no | now | 创建时间 | |
 | gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
-> unique index c_code
+> unique index code

+ 3 - 3
db/product/lj_course_support_relation.md

@@ -5,9 +5,9 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| c_code | varchar(512) | no | | 课程编码 | |
-| s_code | varchar(512) | no | | 周边编码 | |
+| course_code | varchar(512) | no | | 课程编码 | |
+| support_code | varchar(512) | no | | 周边编码 | |
 | gmt_created | smallint | no | now | 创建时间 | | |
 
 ##### index
-> unique index on(c_code, s_code)
+> unique index on(course_code, support_code)

+ 1 - 1
db/product/lj_course_tag_relation.md

@@ -6,7 +6,7 @@
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
 | tag_code |varchar(512) | no | | 标签编码 | |
-| c_code | varchar(512) | no | | 课程或周边编码 | |
+| course_code | varchar(512) | no | | 课程或周边编码 | |
 | gmt_created | timestamp | no | now | 创建时间 | | |
 
 ##### index

+ 2 - 2
db/product/lj_lesson.md

@@ -5,7 +5,7 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| l_code | varchar(512) | no | | 课编码 | uni |
+| code | varchar(512) | no | | 课编码 | uni |
 | name | varchar(1024) | yes | null | 标题 | |
 | digest | text | yes | null | 课摘要 | |
 | sort | int | no |  | tag排序 | |
@@ -14,4 +14,4 @@
 | gmt_modified | timestamp | no | now | 更新时间 | |
 
 ##### index
-> unique index l_code
+> unique index code

+ 2 - 2
db/product/lj_support.md

@@ -5,7 +5,7 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| s_code | varchar(512) | no | | 周边编码 | uni |
+| code | varchar(512) | no | | 周边编码 | uni |
 | name | varchar(1024) | yes | null | 名 | |
 | title | varchar(1024) | yes | null | 标题 | |
 | type | smallint | no | 0 | 类型 | |
@@ -17,4 +17,4 @@
 | gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
-> unique index s_code
+> unique index code

+ 3 - 3
db/product/lj_support_circle_relation.md

@@ -5,9 +5,9 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| f_code | varchar(512) | no | | 课程编码 | |
-| t_code | varchar(512) | no | | 课程编码 | |
+| fcode | varchar(512) | no | | 课程编码 | |
+| tcode | varchar(512) | no | | 课程编码 | |
 | gmt_created | smallint | no | now | 创建时间 | | |
 
 ##### index
-> unique index on(f_code, t_code)
+> unique index on(fcode, tcode)

+ 4 - 2
db/product/lj_tag.md

@@ -5,12 +5,14 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| tag_code | varchar(512) | no | | 标签编码 |unique |
+| code | varchar(512) | no | | 标签编码 |unique |
 | name | varchar(512) | no | | 名字 | |
+| merchant_id | bigint | no | | 渠道id | |
+| type | int | no | | 标签类型, 如周边、课程 | |
 | sort | int | no |  | tag排序 | |
 | status | smallint | no | | 状态 | |
 | gmt_created | timestamp | no | now | 创建时间 | |
 | gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
-> unique index (tag_code)
+> unique index (code)

+ 2 - 2
db/product/lj_unit.md

@@ -5,7 +5,7 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| u_code | varchar(512) | no | | 单元编码 | uni |
+| code | varchar(512) | no | | 单元编码 | uni |
 | name | varchar(1024) | yes | null | 单元标题 | |
 | digest | text | yes | null | 单元摘要 | |
 | sort | int | no |  | 排序 | |
@@ -14,4 +14,4 @@
 | gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
-> unique index u_code
+> unique index code

+ 2 - 2
db/product/lj_ware.md

@@ -5,7 +5,7 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| w_code | varchar(512) | no | | 课件编码 | uni |
+| code | varchar(512) | no | | 课件编码 | uni |
 | name | varchar(1024) | yes | null | 课件名称 | |
 | digest | text | yes | null | 课件摘要 | |
 | type | smallint | no | | 类型 | |
@@ -16,4 +16,4 @@
 | gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
-> unique index w_code
+> unique index code

+ 4 - 3
db/resource/lj_resource.md

@@ -7,9 +7,10 @@
 | id | string | no | | 主键 | pri |
 | code | varchar(512) | yes | | 课编码 | uni |
 | name | varchar(1024) | no | null | 标题 | |
-| digest | text | yes | null | 课摘要 | |
-| url | varchar(1024) | no | | 地址 | |
+| format | varchar(512) | yes | |资源格式 | |
+| quality | varchar(512) | yes | | 资源质量 | |
+| size | int | yes | | 资源大小 | |
+| path | varchar(1024) | no | | 地址 | |
 | status | smallint | no | | 状态 | |
-| tags | string | yes | null | 标签 | |
 | gmt_created | smallint | no | now | 创建时间 | |
 | gmt_modified | timestamp | no | now | 更新时间 | | |