Authored by mali

接口文档

... ... @@ -51,4 +51,198 @@
"message": "查询搜索词列表"
}
```
# 新增商品搭配
> 接口名: `/collocation/insertCollocation`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|productSkn|number|50018101|skn|必填|
|imageUrl|string||图片的相对路径|必填|
|content|string||搭配介绍||
|infoStr|string||搭配方位和搭配的商品信息|必填|
{"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"}]}
---------------------
### 返回 (code为200代表成功,否则看message的失败原因)
``` json
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "insert collocation success."
}
```
# 获取单个商品搭配信息
> 接口名: `/collocation/selectCollocationById`
### 入参 {"param":28947}
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|param|number||搭配的主键|必填|
---------------------
### 返回
``` json
{
"code": 200,
"data": {
"content": "content111",
"createTime": 1456453661,
"id": 28947,
"imageUrl": "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b19e1111.jpg",
"info": [
{
"height": 569,
"id": 5001708,
"label": "50017085",
"left": 116,
"top": 232,
"width": 558
},
{
"height": 228,
"id": 50016303,
"label": "50016303",
"left": 94,
"top": 770,
"width": 403
}
],
"orderBy": 1,
"productSkn": 50018101
},
"md5": "857dfaf106092aeb17ca6b3b7ab38766",
"message": "query collocation success."
}
```
# 更新单个搭配
> 接口名: `/collocation/updateCollocation`
### 入参
{"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"}]}
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|id|number||搭配的主键|必填|
|imageUrl|string||图片url||
|content|string||搭配介绍||
|infoStr|string||搭配的方位信息||
---------------------
### 返回 (code为200代表成功,否则看message的失败原因)
``` json
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "update collocation success."
}
```
# 删除单个搭配
> 接口名: `/collocation/delCollocationById`
### 入参 {"param":28947}
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|param|number||搭配的主键|必填|
---------------------
### 返回 (code为200代表成功,否则看message的失败原因)
``` json
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "delete collocation success."
}
```
# 查询搭配列表
> 接口名: `/collocation/selectCollocationListBySkn`
### 入参 {"productSkn":50018101 }
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|productSkn|number||skn|必填|
---------------------
### 返回
``` json
{
"code": 200,
"data": [
{
"content": "content222",
"createTime": 1456453904,
"id": 28948,
"imageUrl": "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b19e1.jpg",
"orderBy": 2,
"productSkn": 50018101
},
{
"content": "content23333",
"createTime": 1456454512,
"id": 28949,
"imageUrl": "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b139e1.jpg",
"orderBy": 3,
"productSkn": 50018101
},
{
"content": "content",
"createTime": 1456454884,
"id": 28950,
"imageUrl": "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b19e1.jpg",
"orderBy": 4,
"productSkn": 50018101
},
{
"content": "content",
"createTime": 1456454887,
"id": 28951,
"imageUrl": "/2012/03/06/18/020f2f4abf0258814bb938ed9f563b19e1.jpg",
"orderBy": 5,
"productSkn": 50018101
}
],
"md5": "b41dbcde2f182d34abaa197b3c80c14f",
"message": "Product Collocation List."
}
```
\ No newline at end of file
... ...