huodongdong 7 سال پیش
والد
کامیت
30bd248f93

+ 41 - 53
api/cms/course/course_list.md

@@ -1,7 +1,7 @@
 ### GET /course/list
 * method: GET
 * version: v1.0
-* describe: 获取商品列表
+* describe: 获取课程列表
 
 ##### 参数说明
 
@@ -9,68 +9,56 @@
 |---- |:---|:---|:----:|
 | code | string | yes | 编码 |
 | name | string | yes | 名称 |
-| type | int | yes | 商品类型 |
-| state | int | yes | 状态 |
-| sort | string | yes | 排序字段 |
-| by | int | yes | 1: ASC, -1: DESC |
 | pageNo | int | yes | 页码 |
 | pageSize | int | yes | 页大小 |
 
 ##### 返回字段说明
 | name | type | desc |
 |------|:-----|:----:|
-| id | int | 课件id |
-| code | string | 课件编码 |
-| name | string | 课件名称 |
-|digest| string | 课件描述 |
-|type | int | 课件类型 |
-|tags | array | 标签名数组 |
-|playUrl| string | 播放地址 |
-|imgUrls| array | 组图数组 |
-|cpId| int | 内容提供商id |
-|cpName| string | 内容提供商名字 |
-|state| int| 状态 |
-|gmtCreated|int | 创建时间 |
-|gmtModified|int|修改时间|
+| id | bigint | 课程id |
+| code | string | 编码 |
+| name | string | 名称 |
+| title | string | 标题 |
+| digest| string | 描述 |
+| type | string | 类型 |
+| imgUrls | array | 组图数组 |
+| cpId | int | 内容提供商id |
+| cpName| string | 内容提供商名字 |
+| state| int| 状态 |
+| 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": 1,
+        "list": [
+            {
+                "id": 1511767193919357,
+                "code": "C-test-311",
+                "name": "小学310",
+                "title": null,
+                "digest": null,
+                "detail": null,
+                "keyword": null,
+                "cvImgIds": null,
+                "bgImgIds": null,
+                "cpId": null,
+                "cpName": "",
+                "status": "NORMAL",
+                "gmtCreated": null,
+                "gmtModified": null,
+                "subItemList": null
+            }
+        ],
+        "start": 0,
+        "totalNo": 1
     }
-    "list": [
-      {
-        "id": 2,
-        "code": "J-001",
-        "name": "第一课",
-        "digest": "简介",
-        "type": 0,
-        "tags": [
-          {12:'a'},
-          {22:'b'},
-          {23:'c'}
-          ],
-        "imgUrls": [
-          {123:"xxx"},
-          {23:"xxx"}
-          ],
-        "cpId": 123,
-        "cpName": "鲨鱼公园",
-        "state": 0,
-        "gmtCreated": "创建时间",
-        "gmtModified": "修改时间"
-      },
-      ...
-    ]
 }
 ```

+ 41 - 40
api/cms/course/course_one.md

@@ -1,4 +1,4 @@
-### GET /course
+### GET /course/{code}
 * method: GET
 * version: v1.0
 * describe: 获取单个课程
@@ -17,7 +17,7 @@
 | name | string | 名称 |
 | digest| string | 描述 |
 | tags | array | 标签名数组 |
-| lessonArr | array | 课数组 |
+| subItemList | array | 课数组 |
 | cpId| int | 内容提供商id |
 | cpName| string | 内容提供商名字 |
 | state| int| 状态 |
@@ -27,43 +27,44 @@
 ##### 结果示例
 ```
 {
-  "code": "0000",
-  "message": '',
-  "data": {
-    "id": 2,
-    "code": "C-001",
-    "name": "第一课",
-    "digest": "简介",
-    "tags": [
-      {12:'a'},
-      {22:'b'},
-      {23:'c'}
-      ],
-    "lessonArr": [
-      {
-        "id": 2,
-        "code": "J-001",
-        "name": "第一课",
-        "digest": "简介",
-        "type": 0,
-        "cpId": 123,
-        "cpName": "鲨鱼公园",
-        "state": 0,
-        "wareArr": [
-          ...
-        ],
-        "gmtCreated": "创建时间",
-        "gmtModified": "修改时间"
-      },
-      ...
-    ],
-    "supportArr": [
-      ...
-    ]
-    "cpId": 123,
-    "cpName": "鲨鱼公园",
-    "state": 0,
-    "gmtCreated": "创建时间",
-    "gmtModified": "修改时间"
+    "code": 200,
+    "success": true,
+    "message": null,
+    "data": {
+        "id": 1511767193919357,
+        "code": "C-test-311",
+        "name": "小学310",
+        "title": null,
+        "digest": null,
+        "detail": null,
+        "keyword": null,
+        "cvImgIds": null,
+        "bgImgIds": null,
+        "status": "NORMAL",
+        "gmtCreated": null,
+        "gmtModified": null,
+        "subItemList": [
+            {
+                "id": 1511509291305739,
+                "code": "K-test-311",
+                "name": "小学310",
+                "digest": null,
+                "type": "LESSON",
+                "status": null,
+                "gmtCreated": null,
+                "gmtModified": null
+            },
+            {
+                "id": 1511504034666794,
+                "code": "K-test-310",
+                "name": "小学310",
+                "digest": null,
+                "type": "LESSON",
+                "status": null,
+                "gmtCreated": null,
+                "gmtModified": null
+            }
+        ]
+    }
 }
 ```

+ 7 - 2
api/cms/course/course_save.md

@@ -1,6 +1,11 @@
 ### POST /course
 * method: POST
 * version: v1.0
+* describe: 创建课程
+
+
+* method: PUT
+* version: v1.0
 * describe: 修改课程
 
 ##### 参数说明
@@ -11,8 +16,8 @@
 | name | string | no | 课名称 |
 | digest| string | yes | 课描述 |
 | tags | array | yes | 标签名数组 |
-| lessonArr | array | yes | 课数组, 不传不更新, 传[]则更新为空 |
-| supportArr | array | yes | 周边数组, 同课数组 |
+| subItemList | array | yes | 课数组, 不传不更新, 传[]则更新为空 |
+| supportList | array | yes | 周边数组, 同课数组 |
 | cpId| int | yes | 内容提供商id |
 | state| int| yes | 状态|
 

+ 44 - 36
api/cms/lesson/lesson_list.md

@@ -9,9 +9,6 @@
 |---- |:---|:---|:----:|
 | code | string | yes | 课编码 |
 | name | string | yes | 课名称 |
-| state | int | yes | 状态 |
-| sort | string | yes | 排序字段 |
-| by | int | yes | 1: ASC, -1: DESC |
 | pageNo | int | yes | 页码 |
 | pageSize | int | yes | 页大小 |
 
@@ -22,9 +19,6 @@
 | code | string | 课编码 |
 | name | string | 课名称 |
 | digest| string | 课描述 |
-| tags | array | 标签名数组 |
-| cpId| int | 内容提供商id |
-| cpName| string | 内容提供商名字 |
 | state| int| 状态 |
 | gmtCreated|int | 创建时间 |
 | gmtModified|int|修改时间|
@@ -32,36 +26,50 @@
 ##### 结果示例
 ```
 {
-  "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": 3,
+        "list": [
+            {
+                "id": 1511509291305739,
+                "code": "K-test-311",
+                "name": "小学310",
+                "digest": null,
+                "sort": null,
+                "status": null,
+                "gmtCreated": null,
+                "gmtModified": null,
+                "wareList": null
+            },
+            {
+                "id": 1511505168834670,
+                "code": "K-test-31",
+                "name": "小学310",
+                "digest": null,
+                "sort": null,
+                "status": null,
+                "gmtCreated": null,
+                "gmtModified": null,
+                "wareList": null
+            },
+            {
+                "id": 1511504034666794,
+                "code": "K-test-310",
+                "name": "小学310",
+                "digest": null,
+                "sort": null,
+                "status": null,
+                "gmtCreated": null,
+                "gmtModified": null,
+                "wareList": null
+            }
+        ],
+        "start": 0,
+        "totalNo": 1
     }
-    "list": [
-      {
-        "id": 2,
-        "code": "K-001",
-        "name": "第一课",
-        "digest": "简介",
-        "tags": [
-          {12:'a'},
-          {22:'b'},
-          {23:'c'}
-          ],
-        "cpId": 123,
-        "cpName": "鲨鱼公园",
-        "state": 0,
-        "gmtCreated": "创建时间",
-        "gmtModified": "修改时间"
-      },
-      ...
-    ]
 }
 ```

+ 32 - 47
api/cms/lesson/lesson_one.md

@@ -1,4 +1,4 @@
-### GET /lesson
+### GET /lesson/{code}
 * method: GET
 * version: v1.0
 * describe: 获取单个课
@@ -16,10 +16,7 @@
 | code | string | 课编码 |
 | name | string | 课名称 |
 | digest| string | 课描述 |
-| tags | array | 标签名数组 |
-| wareArr | array | 课件数组 |
-| cpId| int | 内容提供商id |
-| cpName| string | 内容提供商名字 |
+| wareList | array | 课件数组 |
 | state| int| 状态 |
 | gmtCreated|int | 创建时间 |
 | gmtModified|int|修改时间|
@@ -27,47 +24,35 @@
 ##### 结果示例
 ```
 {
-  "code": "0000",
-  "message": '',
-  "data": {
-    "id": 2,
-    "code": "K-001",
-    "name": "第一课",
-    "digest": "简介",
-    "tags": [
-      {12:'a'},
-      {22:'b'},
-      {23:'c'}
-      ],
-    "wareArr": [
-      {
-        "id": 2,
-        "code": "J-001",
-        "name": "第一课",
-        "digest": "简介",
-        "type": 0,
-        "tags": [
-          {12:'a'},
-          {22:'b'},
-          {23:'c'}
-          ],
-        "playUrl": "xxx",
-        "imgUrls": [
-          {123:"xxx"},
-          {23:"xxx"}
-        ],
-        "cpId": 123,
-        "cpName": "鲨鱼公园",
-        "state": 0,
-        "gmtCreated": "创建时间",
-        "gmtModified": "修改时间"
-      },
-      ...
-    ],
-    "cpId": 123,
-    "cpName": "鲨鱼公园",
-    "state": 0,
-    "gmtCreated": "创建时间",
-    "gmtModified": "修改时间"
+    "code": 200,
+    "success": true,
+    "message": null,
+    "data": {
+        "id": 1511504034666794,
+        "code": "K-test-310",
+        "name": "小学310",
+        "digest": null,
+        "sort": null,
+        "status": null,
+        "gmtCreated": null,
+        "gmtModified": null,
+        "wareList": [
+            {
+                "id": 1511425213814978,
+                "code": "J-test-310",
+                "name": "小学310",
+                "digest": null,
+                "type": "SINGLE",
+                "playUrl": null,
+                "imgUrls": [
+                  "http://www.xxx.c/img.jpg",
+                ],
+                "sort": null,
+                "status": "NORMAL",
+                "gmtCreated": 1511264969000,
+                "gmtModified": 1511264969000
+            }
+        ]
+    }
 }
 ```

+ 7 - 4
api/cms/lesson/lesson_save.md

@@ -1,6 +1,11 @@
 ### POST /lesson
 * method: POST
 * version: v1.0
+* describe: 创建课
+
+
+* method: PUT
+* version: v1.0
 * describe: 修改课
 
 ##### 参数说明
@@ -10,10 +15,8 @@
 | code | string | no | 课编码 |
 | name | string | no | 课名称 |
 | digest| string | yes | 课描述 |
-| tags | array | yes | 标签名数组 |
-| wareArr | array | yes | 课件数组, 不传不更新, 传[]则更新为空 |
-| cpId| int | yes | 内容提供商id |
-| state| int| yes | 状态|
+| wareList | array | yes | 课件数组, 不传不更新, 传[]则更新为空 |
+| state| string| yes | 状态|
 
 ##### 结果示例
 ```

+ 1 - 1
api/cms/resource/resource_list.md

@@ -24,7 +24,7 @@
 | quality | string | 资源质量 |
 | rate | int | 资源码率 |
 | size | int | 资源大小 |
-| state| string | 状态 |
+| status| string | 状态 |
 | gmtCreated| int | 创建时间 |
 | gmtModified|int|修改时间|
 

+ 33 - 0
api/cms/resource/signature.md

@@ -0,0 +1,33 @@
+### GET /oss/signature
+* method: GET
+* version: v1.0
+* describe: 获资oss签名信息
+
+##### 参数说明
+
+|name |type| null | desc |
+|---- |:---|:---|:----:|
+| fileName | string | yes | 文件名 |
+
+##### 返回字段说明
+| name | type | desc |
+|------|:-----|:----:|
+| path | string | 文件存储位置 |
+
+##### 结果示例
+```
+{
+    "code": 200,
+    "success": true,
+    "message": null,
+    "data": {
+        "accessid": "LTAIUFvd17IXLBQ4",
+        "policy": "eyJleHBpcmF0aW9uIjoiMjAxNy0xMS0yMlQwNzoxNzowOS4zNDNaIiwiY29uZGl0aW9ucyI6W1siY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMTA0ODU3NjAwMF0sWyJzdGFydHMtd2l0aCIsIiRrZXkiLCJyZXNvdXJjZXMvIl1dfQ==",
+        "signature": "1okQEGvm4t+MMMoVjvgTIabl8Ro=",
+        "expire": "1511335029",
+        "dir": "resources/",
+        "path": "a/b/001.png",
+        "host": "http://efunimgs.oss-cn-beijing-internal.aliyuncs.com"
+    }
+}
+```

+ 0 - 3
api/cms/support/support_list.md

@@ -9,9 +9,6 @@
 |---- |:---|:---|:----:|
 | code | string | yes | 编码 |
 | name | string | yes | 名称 |
-| state | int | yes | 状态 |
-| sort | string | yes | 排序字段 |
-| by | int | yes | 1: ASC, -1: DESC |
 | pageNo | int | yes | 页码 |
 | pageSize | int | yes | 页大小 |
 

+ 1 - 1
api/cms/support/support_one.md

@@ -1,4 +1,4 @@
-### GET /lesson
+### GET /support
 * method: GET
 * version: v1.0
 * describe: 获取单个课

+ 70 - 48
api/cms/ware/ware_list.md

@@ -10,9 +10,6 @@
 | code | string | yes | 课件编码 |
 | name | string | yes | 课件名称 |
 | type | int | yes | 课件类型 |
-| state | int | yes | 状态 |
-| sort | string | yes | 排序字段 |
-| by | int | yes | 1: ASC, -1: DESC |
 | pageNo | int | yes | 页码 |
 | pageSize | int | yes | 页大小 |
 
@@ -23,55 +20,80 @@
 | code | string | 课件编码 |
 | name | string | 课件名称 |
 | digest| string | 课件描述 |
-|type | int | 课件类型 |
-|tags | array | 标签名数组 |
-|playUrl| string | 播放地址 |
-|imgUrls| array | 组图数组 |
-|cpId| int | 内容提供商id |
-|cpName| string | 内容提供商名字 |
-|state| int| 状态 |
-|gmtCreated|int | 创建时间 |
-|gmtModified|int|修改时间|
+| type | int | 课件类型 |
+| playUrl| string | 播放地址 |
+| imgUrls| array | 组图数组 |
+| cpId| int | 内容提供商id |
+| cpName| string | 内容提供商名字 |
+| status| int| 状态 |
+| 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": 3,
+        "totalSize": 11,
+        "list": [
+            {
+                "id": 1511425213814978,
+                "code": "J-test-310",
+                "name": "小学310",
+                "digest": null,
+                "type": "SINGLE",
+                "playUrl": null,
+                "imgUrls": [
+                  "http://3du3x.90374kd,027shjse2",
+                ],
+                "cpId": 300,
+                "cpName": "hello",
+                "sort": null,
+                "status": "NORMAL",
+                "gmtCreated": 1511264969000,
+                "gmtModified": 1511264969000
+            },
+            {
+                "id": 1511425207333906,
+                "code": "J-test-309",
+                "name": "小学300",
+                "digest": null,
+                "type": "SINGLE",
+                "playUrl": null,
+                "imgUrls": [
+                  "http://3du3x.90374kd,027shjse2",
+                ],
+                "cpId": 300,
+                "cpName": "hello",
+                "sort": null,
+                "status": "NORMAL",
+                "gmtCreated": 1511264969000,
+                "gmtModified": 1511264969000
+            },
+            {
+                "id": 1511425201409458,
+                "code": "J-test-308",
+                "name": "小学300",
+                "digest": null,
+                "type": "SINGLE",
+                "playUrl": null,
+                "imgUrls": [
+                  "http://3du3x.90374kd,027shjse2",
+                ],
+                "cpId": 300,
+                "cpName": "hello",
+                "sort": null,
+                "status": "NORMAL",
+                "gmtCreated": 1511264969000,
+                "gmtModified": 1511264969000
+            }
+        ],
+        "start": 0,
+        "totalNo": 4
     }
-    "list": [
-      {
-        "id": 2,
-        "code": "J-001",
-        "name": "第一课",
-        "digest": "简介",
-        "type": 0,
-        "tags": [
-          {12:'a'},
-          {22:'b'},
-          {23:'c'}
-          ],
-        "playUrl": "xxx",
-        "imgUrls": [
-          {123:"xxx"},
-          {23:"xxx"}
-          ],
-        "cpId": 123,
-        "cpName": "鲨鱼公园",
-        "state": 0,
-        "gmtCreated": "创建时间",
-        "gmtModified": "修改时间"
-      },
-      ...
-    ]
 }
 ```

+ 0 - 47
api/cms/ware/ware_one.md

@@ -1,47 +0,0 @@
-### GET /ware
-* 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 | 标签名数组 |
-| cpId| int | 内容提供商id |
-| cpName| string | 内容提供商名字 |
-| state| int| 状态 |
-| gmtCreated|int | 创建时间 |
-| gmtModified|int|修改时间|
-
-##### 结果示例
-```
-{
-  "code": "0000",
-  "message": '',
-  "data": {
-    "id": 2,
-    "code": "J-001",
-    "name": "第一课",
-    "digest": "简介",
-    "tags": [
-      {12:'a'},
-      {22:'b'},
-      {23:'c'}
-      ],
-    "cpId": 123,
-    "cpName": "鲨鱼公园",
-    "state": 0,
-    "gmtCreated": "创建时间",
-    "gmtModified": "修改时间"
-}
-```

+ 7 - 3
api/cms/ware/ware_save.md

@@ -1,7 +1,12 @@
 ### POST /ware
 * method: POST
 * version: v1.0
-* describe: 上传或修改课件
+* describe: 上传课件
+
+
+* method: PUT
+* version: v1.0
+* describe: 修改课件
 
 ##### 参数说明
 | name | type | null| desc |
@@ -11,9 +16,8 @@
 | name | string | no | 课件名称 |
 | digest| string | yes | 课件描述 |
 | type | int | no | 课件类型 |
-| tags | array | yes | 标签名数组 |
 | playUrl| string | yes | 播放地址 |
-| imgUrls| array | yes | 组图数组 |
+| imgIds| array | yes | 组图数组 |
 | cpId| int | yes | 内容提供商id |
 | state| int| yes | 状态|
 

+ 3 - 2
db/product/lj_course_sub_relation.md

@@ -5,9 +5,10 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| c_code | varchar(512) | no | | 课程编码 | |
-| t_code | varchar(512) | no | | 单元编码 | |
+| course_code | varchar(512) | no | | 课程编码 | |
+| sub_code | varchar(512) | no | | 单元编码 | |
 | type | smallint | no | 0 | 类型, 0为课程与课对应关系, 1为课程与单元对应关系 | |
+| sort | int | no | | 顺序 | 排序字段 |
 | gmt_created | smallint | no | now | 创建时间 | | |
 
 ##### index

+ 2 - 2
db/product/lj_lesson_ware_relation.md

@@ -5,8 +5,8 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
-| l_code | varchar(512) | no | | 课编码 | |
-| w_code | varchar(512) | no | | 课件编码 | |
+| lesson_code | varchar(512) | no | | 课编码 | |
+| ware_code | varchar(512) | no | | 课件编码 | |
 | gmt_created | timestamp | no | now | 创建时间 | | |
 
 ##### index

+ 2 - 0
db/product/lj_ware.md

@@ -9,7 +9,9 @@
 | name | varchar(1024) | yes | null | 课件名称 | |
 | digest | text | yes | null | 课件摘要 | |
 | type | smallint | no | | 类型 | |
+| play_url | string | yes | null | 视频地址 | |
 | img_ids | varchar(512) | yes | null | 课件组图 | |
+| cp_id | int | yes | 0 | 供应商id | |
 | sort | int | no | 0 | 排序 | |
 | status | smallint | no | | 状态 | |
 | gmt_created | timestamp | no | now | 创建时间 | |