Authored by chenchao

color

# 产品颜色管理接口服务定义
---------------------
# 添加(更新)颜色接口
> 接口名: `/product/update`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|categoryName|string|nike|品类名称|是|
|categoryAbbr|string|n|品类缩写|是|
|firstCategory|string|根目录|一级分类|否|
|secondCategory|string|根目录|二级分类|否|
|thirdCategory|string|根目录|三级分类|否|
|categorySort|number|0|排序|否|
|categoryStatus|boolean|true|状态|否|
|id|int|1|品类ID|
---------------------
### 返回
``` json
{
"code":200,
"message":"添加成功!"
}
```
# 获取品类列表
> 接口名: `/product/getClassList`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|-------|----|----|----|-------|
--------------------------------
### 返回
``` json
{
code:200,
message:"",
data: {
list: [{
categoryName: '', //品类名称
categoryAbbr: '', //品类缩写
firstCategory: '', //一级分类
secondCategory: '', //二级分类
thirdCategory: '', //三级分类
categorySort: '', //排序
categoryStatus: '',//状态,
id: '', //品类ID
}]
page: '', //当前第几页
size: '', //每页多少条
}
}
```
# 添加产品属性接口
> 接口名: `/product/addProductAttribute`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|attributeName|string|衣长|属性名称|是|
|categoryId|number|6|目录ID|是|
|saleType|number|1|销售类型|是|
|inputType|string|checkbox|输入类型|是|
|attributeType|number|2|属性类型|否|
|isMust|String|N|是否必选|否|
|isSearch|String|Y|是否启动搜索|否|
|maxValueLen|number|50|最大输入值|否|
|isAllowAlias|String|N|是否允许别名|否|
|orderBy|number|0|排序|否|
|state|number|1|状态|否|
|remark|string|abc|备注|否|
|attributeValues|string|反光,毛呢,网布,皮革,麻,帆布|属性值|是|
|displayPosition|int|1|展示位置|是
---------------------
### 返回
``` json
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "Product Attribute Add success."
}
```
# 更新产品属性接口
> 接口名: `/product/updateProductAttribute`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|attributId|int|15|属性ID|是|
|attributeName|string|衣长|属性名称|是|
|categoryId|number|6|目录ID|是|
|saleType|number|1|销售类型|是|
|inputType|string|checkbox|输入类型|是|
|attributeType|number|2|属性类型|否|
|isMust|String|N|是否必选|否|
|isSearch|String|Y|是否启动搜索|否|
|maxValueLen|number|50|最大输入值|否|
|isAllowAlias|String|N|是否允许别名|否|
|orderBy|number|0|排序|否|
|state|number|1|状态|否|
|remark|string|abc|备注|否|
|attributeValues|string|反光,毛呢,网布,皮革,麻,帆布|属性值|是|
|displayPosition|int|1|展示位置|是
---------------------
### 返回
``` json
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "Product Attribute update success."
}
```
# 获取产品属性列表接口
> 接口名: `/product/queryProductAttributeList`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|categoryId|int|1|目录ID|是
---------------------
### 返回
``` json
{
"code": 200,
"data": [
{
"attributeId": 15,
"attributeName": "防风外套属性",
"attributeType": 2,
"attributeValues": "11",
"belong": 1,
"categoryId": 454,
"createTime": 1453951139,
"displayPosition": 1,
"inputType": "checkbox",
"isAllowAlias": "Y",
"isColor": "N",
"isMust": "Y",
"isSearch": "Y",
"maxValueLen": 50,
"orderBy": 0,
"remark": "备注",
"saleType": 0,
"state": 0
},
{
"attributeId": 16,
"attributeName": "纹理",
"attributeType": 2,
"attributeValues": "条纹,豹纹",
"belong": 1,
"categoryId": 454,
"createTime": 1453966719,
"displayPosition": 2,
"inputType": "checkbox",
"isAllowAlias": "N",
"isColor": "N",
"isMust": "N",
"isSearch": "N",
"maxValueLen": 50,
"orderBy": 0,
"remark": "备注",
"saleType": 0,
"state": 1
}
],
"md5": "b4a7dec9fb1b236e4aec02ba40411e42",
"message": "Product Attribute List."
}
```
# 获取产品单个属性列表接口
> 接口名: `/product/getProductAttribute`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|attributeId|int|1|属性ID|是
---------------------
### 返回
``` json
{
"code": 200,
"data": {
"attributeId": 22,
"attributeName": "材质",
"attributeType": 2,
"attributeValues": "反光,毛呢,网布,皮革,麻,帆布",
"belong": 1,
"categoryId": 6,
"createTime": 1453970276,
"displayPosition": 1,
"inputType": "checkbox",
"isAllowAlias": "N",
"isColor": "N",
"isMust": "N",
"isSearch": "N",
"maxValueLen": 50,
"orderBy": 0,
"remark": "备注",
"saleType": 1,
"state": 1
},
"md5": "dfc645ecb0c66c8d4771dd2a749047e8",
"message": "Product Attribute get success."
}
```
# 获取产品列表
> 接口名: `/product/getList`
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
| | | | | |
---------------------
### 返回
``` json
{
code:200,
message:"",
data: {
list: [{
//...
}]
page: '', //当前第几页
size: '', //每页多少条
}
}
```
\ No newline at end of file
... ...