Procházet zdrojové kódy

add merchant/product/tags and status api

huodongdong před 7 roky
rodič
revize
420e1a4cc3
1 změnil soubory, kde provedl 58 přidání a 2 odebrání
  1. 58 2
      tob/tobApi.md

+ 58 - 2
tob/tobApi.md

@@ -150,6 +150,19 @@ GET
           'type':'xxx',
           'gmt_modified':1321232,
           'merchantId':'xxxx',
+          'tags': [{
+            "id": "1",
+            "name": "001",
+            "groupId": "d513401461284feea555a3e0abc5974a",
+            "sort": 1,
+            "status": "NORMAL",
+            "gmtCreated": 1512956695000,
+            "gmtModified": 1512971472000,
+            "merchantId": null,
+            "groupName": null,
+            },
+            ...
+            ],
           'goods':[{
             'id':'xxx',
             'duration':2322,
@@ -180,11 +193,11 @@ GET
 
 #### 获取特定产品详情
 ```
-/merchant/product
+/merchant/product/detail
 GET
 {
   'productId':'xxxx',
-  'product_type':2,
+  'merchantId': 'xxx',
 }
 返回
 {
@@ -209,9 +222,52 @@ GET
     }
 }
 ```
+>请求参数
+
+|name |type| null | desc |
+|---- |:---|:---|:----:|
+| code | string | yes | product的编号 |
+| name | string | yes | item名称 |
+| type | int | yes | item类型 |
+| merchantId | int | yes | item类型 |
 
 ---
 
+#### 商品上架下架
+```
+/merchant/product/status
+PUT
+{
+  'productId':'xxxx',
+  'merchantId': 'xxx',
+  'status': 'NORMAL'
+}
+返回
+{
+    "code": 200,
+    "success": true,
+}
+```
+---
+
+#### 商品挂载标签
+```
+/merchant/product/tags
+PUT
+{
+  'productId':'xxxx',
+  'merchantId': 'xxx',
+  'tags': [
+    'xxx',
+    'xxx'
+  ]
+}
+返回
+{
+    "code": 200,
+    "success": true,
+}
+```
 #### 创建课程包
 ```
 /package