Authored by mali

接口文档

@@ -51,4 +51,198 @@ @@ -51,4 +51,198 @@
51 "message": "查询搜索词列表" 51 "message": "查询搜索词列表"
52 } 52 }
53 53
  54 +```
  55 +
  56 +
  57 +
  58 +# 新增商品搭配
  59 +
  60 +> 接口名: `/collocation/insertCollocation`
  61 +
  62 +### 入参
  63 +
  64 +-------------------------
  65 +|属性名称|类型|例子|说明|是否必填|
  66 +|--------|----|----|----|--------|
  67 +|productSkn|number|50018101|skn|必填|
  68 +|imageUrl|string||图片的相对路径|必填|
  69 +|content|string||搭配介绍||
  70 +|infoStr|string||搭配方位和搭配的商品信息|必填|
  71 +
  72 +{"productSkn": 50018101, "imageUrl" : "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b19e1.jpg", "content":"content", "infoStr":[{"id":50017085,"width":"558","height":"569","top":"232","left":"116","label":"50017085"},{"id":50016303,"width":"403","height":"228","top":"770","left":"94","label":"50016303"}]}
  73 +
  74 +---------------------
  75 +
  76 +### 返回 (code为200代表成功,否则看message的失败原因)
  77 +
  78 +``` json
  79 +{
  80 + "code": 200,
  81 + "data": [],
  82 + "md5": "d751713988987e9331980363e24189ce",
  83 + "message": "insert collocation success."
  84 +}
  85 +
  86 +```
  87 +
  88 +# 获取单个商品搭配信息
  89 +
  90 +> 接口名: `/collocation/selectCollocationById`
  91 +
  92 +### 入参 {"param":28947}
  93 +
  94 +-------------------------
  95 +|属性名称|类型|例子|说明|是否必填|
  96 +|--------|----|----|----|--------|
  97 +|param|number||搭配的主键|必填|
  98 +
  99 +---------------------
  100 +
  101 +### 返回
  102 +
  103 +``` json
  104 +{
  105 + "code": 200,
  106 + "data": {
  107 + "content": "content111",
  108 + "createTime": 1456453661,
  109 + "id": 28947,
  110 + "imageUrl": "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b19e1111.jpg",
  111 + "info": [
  112 + {
  113 + "height": 569,
  114 + "id": 5001708,
  115 + "label": "50017085",
  116 + "left": 116,
  117 + "top": 232,
  118 + "width": 558
  119 + },
  120 + {
  121 + "height": 228,
  122 + "id": 50016303,
  123 + "label": "50016303",
  124 + "left": 94,
  125 + "top": 770,
  126 + "width": 403
  127 + }
  128 + ],
  129 + "orderBy": 1,
  130 + "productSkn": 50018101
  131 + },
  132 + "md5": "857dfaf106092aeb17ca6b3b7ab38766",
  133 + "message": "query collocation success."
  134 +}
  135 +
  136 +```
  137 +
  138 +# 更新单个搭配
  139 +
  140 +> 接口名: `/collocation/updateCollocation`
  141 +
  142 +### 入参
  143 +{"id":28947, "imageUrl" : "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b19e1111.jpg", "content":"content111", "infoStr":[{"id":5001708511,"width":"558","height":"569","top":"232","left":"116","label":"50017085"},{"id":50016303,"width":"403","height":"228","top":"770","left":"94","label":"50016303"}]}
  144 +
  145 +-------------------------
  146 +|属性名称|类型|例子|说明|是否必填|
  147 +|--------|----|----|----|--------|
  148 +|id|number||搭配的主键|必填|
  149 +|imageUrl|string||图片url||
  150 +|content|string||搭配介绍||
  151 +|infoStr|string||搭配的方位信息||
  152 +---------------------
  153 +
  154 +### 返回 (code为200代表成功,否则看message的失败原因)
  155 +
  156 +``` json
  157 +{
  158 + "code": 200,
  159 + "data": [],
  160 + "md5": "d751713988987e9331980363e24189ce",
  161 + "message": "update collocation success."
  162 +}
  163 +
  164 +```
  165 +
  166 +# 删除单个搭配
  167 +
  168 +> 接口名: `/collocation/delCollocationById`
  169 +
  170 +### 入参 {"param":28947}
  171 +
  172 +-------------------------
  173 +|属性名称|类型|例子|说明|是否必填|
  174 +|--------|----|----|----|--------|
  175 +|param|number||搭配的主键|必填|
  176 +
  177 +---------------------
  178 +
  179 +### 返回 (code为200代表成功,否则看message的失败原因)
  180 +
  181 +``` json
  182 +{
  183 + "code": 200,
  184 + "data": [],
  185 + "md5": "d751713988987e9331980363e24189ce",
  186 + "message": "delete collocation success."
  187 +}
  188 +
  189 +```
  190 +
  191 +
  192 +# 查询搭配列表
  193 +
  194 +> 接口名: `/collocation/selectCollocationListBySkn`
  195 +
  196 +### 入参 {"productSkn":50018101 }
  197 +
  198 +-------------------------
  199 +|属性名称|类型|例子|说明|是否必填|
  200 +|--------|----|----|----|--------|
  201 +|productSkn|number||skn|必填|
  202 +
  203 +---------------------
  204 +
  205 +### 返回
  206 +
  207 +``` json
  208 +{
  209 + "code": 200,
  210 + "data": [
  211 + {
  212 + "content": "content222",
  213 + "createTime": 1456453904,
  214 + "id": 28948,
  215 + "imageUrl": "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b19e1.jpg",
  216 + "orderBy": 2,
  217 + "productSkn": 50018101
  218 + },
  219 + {
  220 + "content": "content23333",
  221 + "createTime": 1456454512,
  222 + "id": 28949,
  223 + "imageUrl": "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b139e1.jpg",
  224 + "orderBy": 3,
  225 + "productSkn": 50018101
  226 + },
  227 + {
  228 + "content": "content",
  229 + "createTime": 1456454884,
  230 + "id": 28950,
  231 + "imageUrl": "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b19e1.jpg",
  232 + "orderBy": 4,
  233 + "productSkn": 50018101
  234 + },
  235 + {
  236 + "content": "content",
  237 + "createTime": 1456454887,
  238 + "id": 28951,
  239 + "imageUrl": "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b19e1.jpg",
  240 + "orderBy": 5,
  241 + "productSkn": 50018101
  242 + }
  243 + ],
  244 + "md5": "b41dbcde2f182d34abaa197b3c80c14f",
  245 + "message": "Product Collocation List."
  246 +}
  247 +
54 ``` 248 ```