Authored by caoyan

update productAttribute

... ... @@ -103,35 +103,148 @@
```
# 更新产品属性接口
> 接口名: `/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/getAttr`
> 接口名: `/product/queryProductAttributeList`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|id|int|1|商品属性ID|
|categoryId|int|1|目录ID|是
---------------------
### 返回
``` json
{
code:200,
message:"",
data: {
list: [{
attrName: '', //属性名称
saleType: '', //销售类型
inputType: '', //输入类型
enableSearch: '', //启用搜索
id: '', //品类ID
}]
page: '', //当前第几页
size: '', //每页多少条
"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."
}
```
... ...