Authored by chenchao

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-doc into develop

... ... @@ -34,25 +34,7 @@
"platformName":"yohoApp",
"code":"201504091403001",
"matchCode":"",
"createTime":1430378310,
"sorts":[
{
"sortId":2,
"sortName":"男首",
"platformId":"1",
"createTime":1430304722,
"status":1
}
],
"platforms":[
{
"platformId":1,
"platformName":"yohoApp",
"platformFlag":"iphone",
"createTime":1430300615,
"status":1
}
]
"createTime":1430378310
}
]
}
... ... @@ -76,5 +58,60 @@
|code |资源码 |
|matchCode |配对码 |
|createTime |创建时间 |
|sorts |分类列表 |
|platforms |平台列表 |
\ No newline at end of file
### 查询所有的平台
> GET `/resources/platforms`
#### 返回
``` json
{
"code":200
"data":{
"platformId":1,
"platformName":"yohoApp",
"platformFlag":"iphone",
"createTime":1430300615,
"status":1
}
}
```
-----------------------------
|参数名 |描述 |
|------ |---- |
|platformId |平台编号 |
|platformName|平台名称 |
|platformFlag|平台标识 |
|createTime |创建时间 |
|status |状态码 |
### 查询所有的资源分类
> GET `/resources/sorts`
#### 返回
``` json
{
"code":200
"data":{
"sortId":2,
"sortName":"男首",
"platformId":1,
"createTime":1430304722,
"status":1
}
}
```
-----------------------------
|参数名 |描述 |
|------ |---- |
|sortId |分类编号 |
|sortName |分类名称 |
|platformId |平台编号 |
|createTime |创建时间 |
|status |状态码 |
\ No newline at end of file
... ...
# 产品颜色管理接口服务定义
# 品类关联尺码属性管理接口服务定义
---------------------
# 添加颜色接口
# 添加品类关联尺码属性接口
> 接口名: `/productColor/addProductColor/`
> 接口名: `/sortAttribute/add/`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|colorName|string|nike|颜色名称|是|
|colorCode|string|n|RGB code|是|
|colorValue|string|图片URL|一级分类|是|
|sortId |int|1 |品类id |是 |
|attributeId|int|2|尺码属性id|是|
|orderBy|int|2|排序|否|
---------------------
... ... @@ -26,15 +26,18 @@
```
# 获取颜色列表
# 获取品类关联尺码属性列表
> 接口名: `/productColor/queryProductColors`
> 接口名: `sortAttribute/queryList/`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|-------|----|----|----|-------|
|sortId |int|1 |品类id |是 |
|pageNumber|int|2|页码,默认1|是|
|pageSize|int|20|记录数,默认10|是|
--------------------------------
### 返回
... ... @@ -42,87 +45,36 @@
``` json
{
"code": 200,
"data": [
{
"colorCode": "FFFFFF",
"colorName": "白色",
"colorValue": "",
"id": 1
},
{
"colorCode": "333333",
"colorName": "黑色",
"colorValue": "",
"id": 2
},
{
"colorCode": "b9b7af",
"colorName": "灰色",
"colorValue": "",
"id": 3
},
{
"colorCode": "8b5402",
"colorName": "棕色",
"colorValue": "",
"id": 4
},
{
"colorCode": "47ba17",
"colorName": "绿色",
"colorValue": "",
"id": 6
},
{
"colorCode": "0000fe",
"colorName": "蓝色",
"colorValue": "",
"id": 7
},
{
"colorCode": "710098",
"colorName": "紫色",
"colorValue": "",
"id": 8
},
{
"colorCode": "ffeb00",
"colorName": "黄色",
"colorValue": "",
"id": 9
},
{
"colorCode": "ee0000",
"colorName": "红色",
"colorValue": "",
"id": 11
},
{
"colorCode": "ff5c01",
"colorName": "橙色",
"colorValue": "",
"id": 12
},
"data": {
"content": [
{
"colorCode": "#ccccc",
"colorName": "银色",
"colorValue": "http://img02.static.yohobuy.com/adpic/2014/01/27/13/02c286ddb8f5c6824a64a45ef6c8e2d18d.png",
"id": 13
"attributeId": 26,
"attributeName": "直径",
"orderBy": 0,
"sortId": 74,
"sortName": "戒指"
},
{
"colorCode": "FFD83D",
"colorName": "金色",
"colorValue": "http://img01.static.yohobuy.com/adpic/2014/01/27/13/011443440339c06843acfd2f62fda68770.png",
"id": 14
"attributeId": 44,
"attributeName": "周长",
"orderBy": 0,
"sortId": 74,
"sortName": "戒指"
},
{
"colorCode": "#fffff",
"colorName": "彩色",
"colorValue": "http://img02.static.yohobuy.com/adpic/2014/01/27/13/0272608508f09e2bf7eb5543bf5cc70d31.png",
"id": 15
"attributeId": 45,
"attributeName": "周长",
"orderBy": 0,
"sortId": 74,
"sortName": "戒指"
}
],
"md5": "a05b6b224e8d517720865f0060b484ad",
"number": 1,
"size": 30,
"totalElements": 3,
"totalPages": 1
},
"md5": "9d7cb51564aa667059932b0e4be237e9",
"message": "success"
}
... ... @@ -133,19 +85,19 @@
# 更新产品颜色接口
# 更新品类关联尺码属性接口
> 接口名: `/productColor/updateProductColor`
> 接口名: `/sortAttribute/update`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|id |int|1 |id |是 |
|colorName|string|nike|颜色名称|是|
|colorCode|string|n|RGB code|是|
|colorValue|string|图片URL|一级分类|是|
|sortId |int|1 |品类id |是 |
|attributeId|int|2|尺码属性id|是|
|preAttributeId |int|1 |修改前尺码属性id |是 |
|orderBy|int|2|排序|否|
---------------------
### 返回
... ... @@ -160,18 +112,43 @@
```
# 删除品类关联尺码属性接口
> 接口名: `/sortAttribute/delete`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|sortId |int|1 |品类id |是 |
|attributeId|int|2|尺码属性id|是|
---------------------
### 返回
``` json
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": " success."
}
```
# 获取单个产品颜色接口
# 获取单个品类关联尺码属性接口
> 接口名: `/productColor/queryProductColor`
> 接口名: `/sortAttribute/queryBySortAttr`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|param|int|1|颜色ID|是
|sortId |int|1 |品类id |是 |
|attributeId|int|2|尺码属性id|是|
---------------------
### 返回
... ... @@ -180,12 +157,13 @@
{
"code": 200,
"data": {
"colorCode": "cc",
"colorName": "彩色",
"colorValue": "cc-value",
"id": 16
"attributeId": 26,
"attributeName": "直径",
"orderBy": 0,
"sortId": 74,
"sortName": "戒指"
},
"md5": "d08f272cd425a5a89528299e5ab9ebdf",
"md5": "354b1dbdc27b1d285dd2fc6743906f84",
"message": "success"
}
... ...
... ... @@ -151,6 +151,8 @@
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|categoryId|int|1|目录ID|是
|page|int|1|当前第几页|否
|size|int|1|每页多少条|否
---------------------
### 返回
... ... @@ -158,7 +160,8 @@
``` json
{
"code": 200,
"data": [
"data":
"list":[
{
"attributeId": 15,
"attributeName": "防风外套属性",
... ...
一、查询价格列表接口
接口链接:http://172.16.6.227:8083/yohobuy-platform-web/product/queryProductPriceList
类型:POST请求
请求参数:{"product_skn" : 50000060, "shop_id" : 35, "brand_id" : 137, "supplier_id" : 0, "is_jit" : "N", "is_auditing" : 200, "stock" : 1, "gender": "3", "max_sort_id" : 7, "middle_sort_id": 58, "smallSortId" :161, "page": 10, "size" :100}
参数说明:product_skn 商品的skn
shop_id 店铺Id
brand_id 品牌Id
supplier_id 供应商Id
is_jit 是否是代销不入库
is_auditing 上下架状态 1代表上架 0代表下架
stock 是否有库存,1代表有库存,0代表无库存
gender 性别 1代表男性,2代表女性 3代表通用
max_sort_id 大分类的Id
middle_sort_id 中分类Id
smallSortId 小分类的Id
page : 当前页数 从1开始
size :每页显示条数
返回 :
{
"code": 200,
"data": {
"content": [
{
"brand_id": 175,
"brand_name": "团一",
"founder": 9278,
"max_sort_id": 10,
"max_sort_name": "创意生活",
"middle_sort_id": 101,
"middle_sort_name": "文具",
"product_name": "团一复古花纹满本图案牛皮纸笔记本",
"product_pic_url": "http://img12.static.yhbimg.com/goodsimg/2011/06/24/13/02e571a64cea3ea8e734f8f0aae790fb4f.jpg?imageView/0/w/60/h/60",
"product_skn": 50000055,
"retail_price": 29,
"return_coin": 300,
"sales_price": 29,
"small_sort_id": 111,
"small_sort_name": "本子",
"supplier_id": 0,
"updateTime": "2016-02-02 10:37:43",
"vip1_price": 0,
"vip2_price": 0,
"vip3_price": 0,
"vip_discount_type": 1,
"vip_price": 0
},
{
"brand_id": 187,
"brand_name": "顽",
"founder": 9278,
"max_sort_id": 8,
"max_sort_name": "服配",
"middle_sort_id": 66,
"middle_sort_name": "配饰",
"product_name": "PLAY顽植物大战僵尸坚果墙挂饰",
"product_pic_url": "http://img10.static.yhbimg.com/goodsimg/2011/06/23/05/01bda4fc443c96aa3a2e9287c3c17be87a.jpg?imageView/0/w/60/h/60",
"product_skn": 50000056,
"retail_price": 18,
"return_coin": 0,
"sales_price": 18,
"small_sort_id": 305,
"small_sort_name": "挂饰",
"supplier_id": 0,
"updateTime": "2016-02-02 10:37:43",
"vip1_price": 0,
"vip2_price": 0,
"vip3_price": 0,
"vip_discount_type": 1,
"vip_price": 0
}
],
"number": 1,
"size": 2,
"totalElements": 2,
"totalPages": 1
},
"md5": "9a92b3c94d9676a8089169ee46ebce4a",
"message": "Product Price List."
}
二: 查询所有的店铺信息
请求链接:http://172.16.6.227:8083/yohobuy-platform-web/ShopsRest/queryAllShops
请求参数:无
返回
{
"code": 200,
"data": [
{
"checkStatus": 0,
"shopName": "得宝旗舰店",
"shopsId": 15,
"status": 0
},
{
"checkStatus": 0,
"shopName": ":CHOCOOLATEQ",
"shopsId": 16,
"status": 0
}
],
"message": "操作成功"
}
三:查询所有的品牌列表
请求链接:http://172.16.6.227:8083/yohobuy-platform-web/erpproduct/brands/queryAllBrands
请求参数:无
返回
{
"code": 200,
"data": [
{
"brandDomain": "lily",
"brandName": "lily",
"brandNameEn": "lily",
"id": 1431,
"status": 1
},
{
"brandDomain": "test",
"brandName": "test",
"brandNameCn": "",
"brandNameEn": "test",
"id": 1430,
"status": 1
}
],
"md5": "03098c8c158c8405117daadb91ed792a",
"message": "Product Brand List."
}
四:查询所有的供应商列表信息
请求链接:http://172.16.6.227:8083/yohobuy-platform-web/supplier/supplier/queryAllSupplier
请求参数:无
响应:
{
"code": 200,
"data": [
{
"brandId": 0,
"supplierId": 1,
"supplierName": "10*1"
},
{
"brandId": 0,
"supplierId": 2,
"supplierName": "广派商业(上海)有限公司"
},
{
"brandId": 0,
"supplierId": 3,
"supplierName": "广州市海珠区艺柏时装经营部"
}
],
"message": "操作成功"
}
五:查询商品是否是JIT配置
请求链接:http://172.16.6.227:8083/yohobuy-platform-web/product/queryJitConfigList
请求参数:无
响应:
{
"code": 200,
"data": {
"N": "非JIT",
"Y": "是JIT"
},
"md5": "47b9033a2b45f1f51739d7c8ca2b2e29",
"message": "Jit Config List."
}
六:查询商品状态的配置
请求链接:http://172.16.6.227:8083/yohobuy-platform-web/product/queryProductStatusConfigList
请求参数:无
响应:
{
"code": 200,
"data": {
"0": "下架",
"200": "上架"
},
"md5": "3e1f4e393d82140086f3b11342196cb6",
"message": "Status Config List."
}
六:查询商品库存情况的配置
请求链接:http://172.16.6.227:8083/yohobuy-platform-web/product/queryProductStockConfigList
请求参数:无
响应:
{
"code": 200,
"data": {
"0": "无库存",
"1": "有库存"
},
"md5": "b5fdee6640106a6eff445b8181a7e96b",
"message": "Stock Config List."
}
七:查询商品所属性别分类信息
请求链接:http://172.16.6.227:8083/yohobuy-platform-web/product/queryGenderConfigList
请求参数:无
响应:
{
"code": 200,
"data": {
"1": "男",
"2": "女",
"3": "通用"
},
"md5": "454312b4aadbcd602078c175631f20ea",
"message": "Gender Config List."
}
八:查询所有的一级分类列表
请求链接:http://172.16.6.227:8083/yohobuy-platform-web/product/queryAllMaxSortList
请求参数:无
响应:(备注: id 和 sortName 有用)
{
"code": 200,
"data": [
{
"booleanStatus": true,
"createTime": 0,
"gender": 3,
"id": 365,
"isHot": "N",
"orderBy": 0,
"parentId": 0,
"sortCode": "365,0,0",
"sortInitials": "潮童",
"sortLevel": 1,
"sortName": "潮童",
"status": 1,
"updateTime": 1454060643
},
{
"booleanStatus": false,
"createTime": 0,
"gender": 3,
"id": 241,
"isHot": "N",
"orderBy": 0,
"parentId": 0,
"sortCode": "241,0,0",
"sortInitials": "数码周边",
"sortLevel": 1,
"sortName": "数码周边",
"status": 0,
"updateTime": 0
}
],
"md5": "dc2b4caace98d678cf688edcdd204675",
"message": "Product Sort List."
}
九:根据skn获取价格信息
请求链接 : http://172.16.6.227:8083/yohobuy-platform-web/product/getProductPrice
参数:{"param": 50000060}
响应:
{
"code": 200,
"data": {
"founder": 9278,
"product_skn": 50000060,
"retail_price": 188,
"return_coin": 88,
"sales_price": 211.22,
"updateTime": "2016-02-02 10:37:43",
"vip1_price": 99.56,
"vip2_price": 99.89,
"vip3_price": 99.44,
"vip_discount_type": 5,
"vip_price": 99
},
"md5": "98baa90e7b2ed957b94b94361aa8e05e",
"message": "Product Price get success."
}
十:单个商品变价
请求链接 :http://172.16.6.227:8083/yohobuy-platform-web/product/updateProductPrice
参数:{ "productSkn": 50000060, "salesPrice" :211.22, "vipDiscountType":5, "founder":9278, "returnCoin":88, "vipPrice":99}
备注 :productSkn 商品标识 数字型
salesPrice 销售价格 数字型
vipDiscountType 折扣类型 1、2、3、4、5
founder : 操作人标识 数字型
returnCoin :返回币数 整型
vipPrice : vip价格 vipDiscountType 为4时必填
vip1Price vip2Price vip3Price 折扣类型为5时必填
响应:
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "Product Price update success."
}
备注 :code 为200代表成功
\ No newline at end of file
... ...