Преглед на файлове

add tag group and tag api

huodongdong преди 7 години
родител
ревизия
678e2feb54
променени са 8 файла, в които са добавени 372 реда и са изтрити 9 реда
  1. 67 0
      api/cms/group/group_list.md
  2. 57 0
      api/cms/group/group_one.md
  3. 55 7
      api/cms/item/item_one.md
  4. 59 0
      api/cms/tag/tag_list.md
  5. 62 0
      api/cms/tag/tag_one.md
  6. 71 0
      api/cms/tag/tag_save.md
  7. 0 2
      db/product/lj_package_item_relation.md
  8. 1 0
      db/product/lj_tag.md

+ 67 - 0
api/cms/group/group_list.md

@@ -0,0 +1,67 @@
+### GET /group/list
+* method: GET
+* version: v1.0
+* describe: 获取标签组列表
+
+##### 参数说明
+
+|name |type| null | desc |
+|---- |:---|:---|:----:|
+| code | string | yes | 编码 |
+| name | string | yes | 名称 |
+| merchantId | string | yes | 渠道id |
+| status | string | yes | 类型 |
+| pageNo | int | yes | 页码 |
+| pageSize | int | yes | 页大小 |
+
+##### 返回字段说明
+| name | type | desc |
+|------|:-----|:----:|
+| id | string | id |
+| code | string | 代码 |
+| name | string | 名称 |
+| merchantId | string | 渠道id |
+| name| string | 标签组名称 |
+| status| string| 状态 |
+| gmtCreated|int | 创建时间 |
+| gmtModified|int|修改时间|
+
+##### 结果示例
+```
+{
+    "code": 200,
+    "success": true,
+    "message": null,
+    "data": {
+        "pageNo": 1,
+        "pageSize": 10,
+        "totalSize": 2,
+        "list": [
+            {
+                "id": "d513401461284feea555a3e0abc5974a",
+                "code": "K-test-311",
+                "name": "小学310",
+                "merchantId": "87",
+                "sort": 2,
+                "status": "NORMAL",
+                "tagList": null,
+                "gmtCreated": 1512960192000,
+                "gmtModified": 1512960192000
+            },
+            {
+                "id": "1",
+                "code": "G-001",
+                "name": "001",
+                "merchantId": "82",
+                "sort": 1,
+                "status": null,
+                "tagList": null,
+                "gmtCreated": 1512956648000,
+                "gmtModified": 1512956648000
+            }
+        ],
+        "start": 0,
+        "totalNo": 1
+    }
+}
+```

+ 57 - 0
api/cms/group/group_one.md

@@ -0,0 +1,57 @@
+### GET /group/{id}
+* method: GET
+* version: v1.0
+* describe: 获取标签组
+
+##### 参数说明
+
+|name |type| null | desc |
+|---- |:---|:---|:----:|
+| id | string | no | group id |
+
+##### 返回字段说明
+| name | type | desc |
+|------|:-----|:----:|
+| id | string | id |
+| code | string | 代码 |
+| name | string | 名称 |
+| merchantId | string | 渠道id |
+| name| string | 标签组名称 |
+| status| string| 状态 |
+| tagList | array | 标签列表 |
+| gmtCreated|int | 创建时间 |
+| gmtModified|int|修改时间|
+
+##### 结果示例
+```
+{
+    "code": 200,
+    "success": true,
+    "message": null,
+    "data": {
+        "id": "d513401461284feea555a3e0abc5974a",
+        "code": "K-test-311",
+        "name": "小学310",
+        "merchantId": "87",
+        "sort": 2,
+        "status": "NORMAL",
+        "tagList": [
+            {
+                "id": "1",
+                "name": "001",
+                "groupId": "d513401461284feea555a3e0abc5974a",
+                "sort": 1,
+                "type": "COURSE",
+                "status": "NORMAL",
+                "gmtCreated": 1512956695000,
+                "gmtModified": 1512971472000,
+                "merchantId": "87",
+                "groupName": "小学310",
+                "itemList": null
+            }
+        ],
+        "gmtCreated": 1512960192000,
+        "gmtModified": 1512960192000
+    }
+}
+```

+ 55 - 7
api/cms/item/item_one.md

@@ -31,17 +31,65 @@
     "success": true,
     "message": null,
     "data": {
-        "id": 1511947147962852,
-        "code": "C-test-311",
+        "id": "061bf606584c4efdab1e0e6b7a71893b",
+        "subId": "b3bfc6d5b15e474c95db98bd754cfeaf",
+        "code": "K-test-311",
         "name": "小学310",
         "type": "COURSE",
-        "merchantId": 85,
+        "merchantId": "87",
         "sort": 2,
         "status": "SALE",
-        "gmtCreated": null,
-        "gmtModified": null,
-        "priceList": null,
-        "tagList": null
+        "gmtCreated": 1512981450000,
+        "gmtModified": 1512981450000,
+        "priceList": [
+            {
+                "id": "ca3710131a43496194f411f0ad4e7b79",
+                "name": "test",
+                "itemId": "061bf606584c4efdab1e0e6b7a71893b",
+                "type": "NORMAL",
+                "duration": 10,
+                "cpPrice": 1,
+                "merchantPrice": 2,
+                "terminalPrice": 3,
+                "sort": 0,
+                "status": "NORMAL",
+                "gmtCreated": null,
+                "gmtModified": null,
+                "packageId": null
+            }
+        ],
+        "tagList": [
+            {
+                "id": "1",
+                "name": "001",
+                "groupId": "d513401461284feea555a3e0abc5974a",
+                "sort": 1,
+                "type": "COURSE",
+                "status": "NORMAL",
+                "gmtCreated": 1512956695000,
+                "gmtModified": 1512971472000,
+                "merchantId": "87",
+                "groupName": "小学310",
+                "itemList": null
+            }
+        ],
+        "course": {
+            "id": "b3bfc6d5b15e474c95db98bd754cfeaf",
+            "code": "K-test-311",
+            "name": "小学",
+            "title": null,
+            "digest": null,
+            "detail": null,
+            "keyword": null,
+            "cvImgList": null,
+            "bgImgList": null,
+            "status": null,
+            "gmtCreated": null,
+            "gmtModified": null,
+            "subItemList": [],
+            "supportList": []
+        },
+        "support": null
     }
 }
 ```

+ 59 - 0
api/cms/tag/tag_list.md

@@ -0,0 +1,59 @@
+### GET /tag/list
+* method: GET
+* version: v1.0
+* describe: 获取标签列表
+
+##### 参数说明
+
+|name |type| null | desc |
+|---- |:---|:---|:----:|
+| code | string | yes | 编码 |
+| name | string | yes | 名称 |
+| merchantId | string | yes | 渠道id |
+| type | string | yes | 类型 |
+| pageNo | int | yes | 页码 |
+| pageSize | int | yes | 页大小 |
+
+##### 返回字段说明
+| name | type | desc |
+|------|:-----|:----:|
+| id | string | id |
+| name | string | 名称 |
+| type | string | 类型 |
+| merchantId | string | 渠道id |
+| groupId | string | 标签组id |
+| groupName| string | 标签组名称 |
+| status| string| 状态 |
+| gmtCreated|int | 创建时间 |
+| gmtModified|int|修改时间|
+
+##### 结果示例
+```
+{
+    "code": 200,
+    "success": true,
+    "message": null,
+    "data": {
+        "pageNo": 1,
+        "pageSize": 10,
+        "totalSize": 1,
+        "list": [
+            {
+                "id": "1",
+                "name": "001",
+                "groupId": "d513401461284feea555a3e0abc5974a",
+                "sort": 1,
+                "type": "COURSE",
+                "status": "NORMAL",
+                "gmtCreated": 1512956695000,
+                "gmtModified": 1512971472000,
+                "merchantId": "87",
+                "groupName": "小学310",
+                "itemList": null
+            }
+        ],
+        "start": 0,
+        "totalNo": 1
+    }
+}
+```

+ 62 - 0
api/cms/tag/tag_one.md

@@ -0,0 +1,62 @@
+### GET /tag/{id}
+* method: GET
+* version: v1.0
+* describe: 获取标签
+
+##### 参数说明
+
+|name |type| null | desc |
+|---- |:---|:---|:----:|
+| id | string | no | id |
+
+##### 返回字段说明
+| name | type | desc |
+|------|:-----|:----:|
+| id | string | id |
+| name | string | 名称 |
+| type | string | 类型 |
+| merchantId | string | 渠道id |
+| groupId | string | 标签组id |
+| groupName| string | 标签组名称 |
+| status| string| 状态 |
+| gmtCreated|int | 创建时间 |
+| gmtModified|int|修改时间|
+
+##### 结果示例
+```
+{
+    "code": 200,
+    "success": true,
+    "message": null,
+    "data": {
+        "id": "1",
+        "name": "001",
+        "groupId": "d513401461284feea555a3e0abc5974a",
+        "sort": 1,
+        "type": "COURSE",
+        "status": "NORMAL",
+        "gmtCreated": 1512956695000,
+        "gmtModified": 1512971472000,
+        "merchantId": null,
+        "groupName": null,
+        "itemList": [
+            {
+                "id": "061bf606584c4efdab1e0e6b7a71893b",
+                "subId": "b3bfc6d5b15e474c95db98bd754cfeaf",
+                "code": "K-test-311",
+                "name": "小学310",
+                "type": "COURSE",
+                "merchantId": "87",
+                "sort": 2,
+                "status": "SALE",
+                "gmtCreated": 1512981450000,
+                "gmtModified": 1512981450000,
+                "priceList": null,
+                "tagList": null,
+                "course": null,
+                "support": null
+            }
+        ]
+    }
+}
+```

+ 71 - 0
api/cms/tag/tag_save.md

@@ -0,0 +1,71 @@
+### POST /tag
+* method: POST
+* version: v1.0
+* describe: 新建标签
+
+* method: PUT
+* version: v1.0
+* describe: 修改标签
+
+##### 参数说明
+| name | type | desc |
+|------|:-----|:----:|
+| id | string | id |
+| name | string | 名称 |
+| type | string | 类型 |
+| groupId | string | 标签组id |
+| status| string| 状态 |
+| itemList | array | itemId list, 带顺序 |
+> 新建不带id, 修改需要id
+
+##### 返回字段说明
+| name | type | desc |
+|------|:-----|:----:|
+| id | string | id |
+| name | string | 名称 |
+| type | string | 类型 |
+| merchantId | string | 渠道id |
+| groupId | string | 标签组id |
+| groupName| string | 标签组名称 |
+| status| string| 状态 |
+| gmtCreated|int | 创建时间 |
+| gmtModified|int|修改时间|
+
+##### 结果示例
+```
+{
+    "code": 200,
+    "success": true,
+    "message": null,
+    "data": {
+        "id": "1",
+        "name": "001",
+        "groupId": "d513401461284feea555a3e0abc5974a",
+        "sort": 1,
+        "type": "COURSE",
+        "status": "NORMAL",
+        "gmtCreated": 1512956695000,
+        "gmtModified": 1512971472000,
+        "merchantId": null,
+        "groupName": null,
+        "itemList": [
+            {
+                "id": "061bf606584c4efdab1e0e6b7a71893b",
+                "subId": "b3bfc6d5b15e474c95db98bd754cfeaf",
+                "code": "K-test-311",
+                "name": "小学310",
+                "type": "COURSE",
+                "merchantId": "87",
+                "sort": 2,
+                "status": "SALE",
+                "gmtCreated": 1512981450000,
+                "gmtModified": 1512981450000,
+                "priceList": null,
+                "tagList": null,
+                "course": null,
+                "support": null
+            }
+        ]
+    }
+}
+```

+ 0 - 2
db/product/lj_package_item_relation.md

@@ -5,9 +5,7 @@
 | field | type | null | default | desc | extra |
 |----|:-----|:-------|:------|:-----|:-----|
 | id | varchar(512) | no | | 主键 | pri |
-| _id | varchar(512) | no | | | |
 | item_id | varchar(512) | no | | | |
-| price_id | varchar(512) | no | | 价格 | |
 | dis_price | double(16,2) | null | | 打进课程包的价格 | |
 | gmt_created | timestamp | no | now | 创建时间 | | |
 

+ 1 - 0
db/product/lj_tag.md

@@ -7,6 +7,7 @@
 | id | varchar(512) | no | | 主键 | pri |
 | name | varchar(512) | no | | 名字 | |
 | sort | int | no |  | tag排序 | |
+| type | smallint | no | | 标签类型 | |
 | status | smallint | no | | 状态 | |
 | gmt_created | timestamp | no | now | 创建时间 | |
 | gmt_modified | timestamp | no | now | 更新时间 | | |