|
|
# 店铺接口服务定义
|
|
|
---------------------
|
|
|
|
|
|
## 创建店铺
|
|
|
|
|
|
> 接口名:`/shops/createShop`
|
|
|
## 获取店铺列表
|
|
|
> 接口名: `/ShopsRest/getShopList`
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|shopName|String|得宝旗舰店|店铺名称|
|
|
|
|shopNature|int|1|店铺性质(1 旗舰店 2 专卖店)|
|
|
|
|shopDomain|String|debao|店铺域名|
|
|
|
|createPid|int|1|创建人ID|
|
|
|
|shopLogo|String|http://img11.static.yhbimg.com/yhb-img01/2015/09/11/02/01f42dff5d5bd383af1025eea1218cbccc.jpg?imageView/{mode}/w/{width}/h/{height}|店铺logo|
|
|
|
|shopIntro|String|秉承以设计为核心的创新理念,用专业的思维方式将自然与科技、传统与革新、技艺与时尚三者良好融合,着重面料材质与软式廓型的品质互动,更好的诠释“less is more”的设计理念。|店铺简介|
|
|
|
|shopAdmin|JSON数组|||
|
|
|
|shopRelation|JSON数组|||
|
|
|
|websiteUrl|JSON数组|["www.paperworks.com.cn"]||
|
|
|
|otherUrl|JSON数组|["www.paperworks.com.cn","https:\/\/jnby.tmall.com\/"]||
|
|
|
|shopAddress|JSON数组|||
|
|
|
---------------------
|
|
|
|page|int|2|第几页|
|
|
|
|size|int|50|每页条数|
|
|
|
|supplierId|int|950|供应商ID|
|
|
|
|brandId|int|928|品牌ID|
|
|
|
|checkStatus|int|928|审核状态;100 暂存 200 待审核 300 审核通过 900 驳回|
|
|
|
|operationStatus|int|1|操作状态; 1 店铺未创建 2 店铺已创建|
|
|
|
|checkStatusArr|String|200,300|必须包含的状态|
|
|
|
---------------------------
|
|
|
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
```json
|
|
|
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"创建成功",
|
|
|
"data":{
|
|
|
"shopId":12
|
|
|
"code": 200,
|
|
|
"data": {
|
|
|
"list": [
|
|
|
{
|
|
|
"checkStatus": 200,
|
|
|
"createTime": "2015-11-27 15:45:19",
|
|
|
"shopName": "Case Scenario",
|
|
|
"shopRelationList": [
|
|
|
{
|
|
|
"brandId": 409,
|
|
|
"brandName": "Case Scenario",
|
|
|
"brandNameCn": "",
|
|
|
"brandNameEn": "Case Scenario",
|
|
|
"brandStatus": 1,
|
|
|
"supplierId": 0,
|
|
|
"supplierStatus": 0
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
"code":500,
|
|
|
"message":"创建失败",
|
|
|
"data":{
|
|
|
"shopId":-12
|
|
|
],
|
|
|
"shopsId": 31,
|
|
|
"status": 1,
|
|
|
"updateTime": "2015-12-08 19:20:44"
|
|
|
}
|
|
|
}
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"shop_name is null"
|
|
|
}
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"Sorry,店铺名已存在"
|
|
|
}
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"shop_domain is null"
|
|
|
}
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"Sorry,店铺域名已存在"
|
|
|
}
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"shop_admin is null"
|
|
|
}
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"shop_relation is null"
|
|
|
],
|
|
|
"page": 1,
|
|
|
"size": 10,
|
|
|
"total": 79,
|
|
|
"totalPage": 8
|
|
|
},
|
|
|
"message": "操作成功"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
---------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
## 获取店铺列表
|
|
|
> 接口名: `/shops/getShopList`
|
|
|
## 获取店铺详情
|
|
|
|
|
|
> 接口名: `/ShopsRest/getShopDetailById`
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|page|int|2|第几页|
|
|
|
|size|int|50|每页条数|
|
|
|
|shopsId|int|15|店铺ID|
|
|
|
|shopName|String|得宝旗舰店|店铺名称|
|
|
|
|shopNature|int|1|店铺性质(1 旗舰店 2 专卖店)|
|
|
|
|status|int|1|状态(1开启 0 关闭)|
|
|
|
|checkStatus|int|300|审核状态(100 暂存 200 待审核 300 审核通过 900 驳回)|
|
|
|
|supplierId|int|950|供应商ID|
|
|
|
|brandId|int|928|品牌ID|
|
|
|
---------------------------
|
|
|
-----------------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
```json
|
|
|
|
|
|
{
|
|
|
"code":200
|
|
|
"message":"ok"
|
|
|
"data":
|
|
|
"code": 200,
|
|
|
"data": {
|
|
|
"checkStatus": 200,
|
|
|
"createTime": "2016-01-29 23:11:00",
|
|
|
"otherUrl": "other,other2",
|
|
|
"shopAddress": "地址1,地址2",
|
|
|
"shopDomain": "shopDomain2311",
|
|
|
"shopIntro": "shopIntro",
|
|
|
"shopLogo": "http:///yhfairshopLogo?imageView/1/w/200/h/200",
|
|
|
"shopName": "店铺名称1234",
|
|
|
"shopNature": 1,
|
|
|
"shopRelationList": [
|
|
|
{
|
|
|
"page":1,
|
|
|
"totalPage": 10,
|
|
|
"total": 100
|
|
|
"size": 10,
|
|
|
"list":
|
|
|
"agreementEndTime": "2016-03-31 00:00:00",
|
|
|
"brandId": 178,
|
|
|
"brandName": "Artanky",
|
|
|
"brandNameCn": "",
|
|
|
"brandNameEn": "Artanky ",
|
|
|
"brandStatus": 1,
|
|
|
"isFreeze": "N",
|
|
|
"supplierId": 480,
|
|
|
"supplierName": "成都朋克汉堡服装有限公司",
|
|
|
"supplierStatus": 300
|
|
|
},
|
|
|
{
|
|
|
"shopsId": 15,
|
|
|
"shopName": "",
|
|
|
"shopDomain": "",
|
|
|
"shopNature": "",
|
|
|
"shopLogo": "",
|
|
|
"websiteUrl": "",
|
|
|
"shopAddress": "",
|
|
|
"createPid": "",
|
|
|
"checkStatus": "",
|
|
|
"createTime": "",
|
|
|
"updateTime": "",
|
|
|
"status": "",
|
|
|
"shopsAdmin": {
|
|
|
"id": "",
|
|
|
"shopsId": "",
|
|
|
"adminPid": "",
|
|
|
"identity": "",
|
|
|
"createTime": "",
|
|
|
"updateTime": ""
|
|
|
"agreementEndTime": "2017-01-31 00:00:00",
|
|
|
"brandId": 355,
|
|
|
"brandName": "TMCAZ",
|
|
|
"brandNameCn": "磨叽星人",
|
|
|
"brandNameEn": "TMCAZ",
|
|
|
"brandStatus": 1,
|
|
|
"isFreeze": "N",
|
|
|
"supplierId": 310,
|
|
|
"supplierName": "上海贺王工贸实业公司",
|
|
|
"supplierStatus": 300
|
|
|
},
|
|
|
"shopsBrandList": [{
|
|
|
"id": "",
|
|
|
"shopsId": "",
|
|
|
"brandId": "",
|
|
|
"supplierId": "",
|
|
|
"createTime": "",
|
|
|
"updateTime": "",
|
|
|
"agreementEndTime": ""
|
|
|
},{
|
|
|
"id": "",
|
|
|
"shopsId": "",
|
|
|
"brandId": "",
|
|
|
"supplierId": "",
|
|
|
"createTime": "",
|
|
|
"updateTime": "",
|
|
|
"agreementEndTime": ""
|
|
|
}],
|
|
|
"shopsSupplierList": [{
|
|
|
"id": "",
|
|
|
"shopsId": "",
|
|
|
"brandId": "",
|
|
|
"brandName": "",
|
|
|
"agreementEndTime": ""
|
|
|
},{
|
|
|
"id": "",
|
|
|
"shopsId": "",
|
|
|
"brandId": "",
|
|
|
"brandName": "",
|
|
|
"agreementEndTime": ""
|
|
|
}]
|
|
|
}
|
|
|
{
|
|
|
"agreementEndTime": "2016-12-19 00:00:00",
|
|
|
"brandId": 1389,
|
|
|
"brandName": "WWTorres",
|
|
|
"brandNameCn": "",
|
|
|
"brandNameEn": "WWTorres",
|
|
|
"brandStatus": 1,
|
|
|
"isFreeze": "N",
|
|
|
"supplierId": 1226,
|
|
|
"supplierName": "上海矩乐文化发展有限公司",
|
|
|
"supplierStatus": 300
|
|
|
}
|
|
|
],
|
|
|
"shopsId": 454,
|
|
|
"shopsType": 2,
|
|
|
"status": 0,
|
|
|
"updateTime": "2016-01-29 23:27:05",
|
|
|
"websiteUrl": "https,https2"
|
|
|
},
|
|
|
"message": "操作成功"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## 店铺同步
|
|
|
> 接口名: `/shops/synchronizeShop`
|
|
|
---------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
## 创建店铺
|
|
|
|
|
|
> 接口名:`/ShopsRest/addShops`
|
|
|
|
|
|
### 入参
|
|
|
|
...
|
...
|
@@ -168,90 +150,132 @@ |
|
|
|shopNature|int|1|店铺性质(1 旗舰店 2 专卖店)|
|
|
|
|shopDomain|String|debao|店铺域名|
|
|
|
|createPid|int|1|创建人ID|
|
|
|
shopLogo|String|http://img11.static.yhbimg.com/yhb-img01/2015/09/11/02/01f42dff5d5bd383af1025eea1218cbccc.jpg?imageView/{mode}/w/{width}/h/{height}|店铺logo|
|
|
|
|shopsType|int|1|店铺模式(1-单品店;2-多品店)|
|
|
|
|shopLogo|String|http://img11.static.yhbimg.com/yhb-img01/2015/09/11/02/01f42dff5d5bd383af1025eea1218cbccc.jpg?imageView/{mode}/w/{width}/h/{height}|店铺logo|
|
|
|
|shopIntro|String|秉承以设计为核心的创新理念,用专业的思维方式将自然与科技、传统与革新、技艺与时尚三者良好融合,着重面料材质与软式廓型的品质互动,更好的诠释“less is more”的设计理念。|店铺简介|
|
|
|
|shopAdmin|JSON数组|||
|
|
|
|shopRelation|JSON数组|||
|
|
|
|websiteUrl|JSON数组|["www.paperworks.com.cn"]||
|
|
|
|otherUrl|JSON数组|["www.paperworks.com.cn","https:\/\/jnby.tmall.com\/"]||
|
|
|
|shopAddress|JSON数组|||
|
|
|
---------------------------
|
|
|
|onCheck|int|1|是否需要审核(1-是;0-否)|
|
|
|
|shopRelation|JSON数组||品牌与供应商关系|
|
|
|
---------------------
|
|
|
|
|
|
### 返回
|
|
|
shopRelation的json格式为:
|
|
|
``` json
|
|
|
|
|
|
```json
|
|
|
"shopRelation":[
|
|
|
{
|
|
|
"brandId":355,
|
|
|
"supplierId":310,
|
|
|
"agreementEndTime":1485792000
|
|
|
},
|
|
|
{
|
|
|
"brandId":1389,
|
|
|
"supplierId":1226,
|
|
|
"agreementEndTime":1482076800
|
|
|
}
|
|
|
]
|
|
|
```
|
|
|
|
|
|
### 返回
|
|
|
返回码code为200就是成功,其余为失败。
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200
|
|
|
"message":"修改成功"
|
|
|
}
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"shops_id is null"
|
|
|
}
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"shop_name is null"
|
|
|
}
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"Sorry,店铺名已存在"
|
|
|
}
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"shop_domain is null"
|
|
|
"code": 200,
|
|
|
"message": "success."
|
|
|
}
|
|
|
```
|
|
|
|
|
|
---------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
## 修改店铺
|
|
|
|
|
|
> 接口名:`/ShopsRest/updateShops`
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|shopsId|int|2|店铺id|
|
|
|
|shopName|String|得宝旗舰店|店铺名称|
|
|
|
|shopNature|int|1|店铺性质(1 旗舰店 2 专卖店)|
|
|
|
|shopDomain|String|debao|店铺域名|
|
|
|
|createPid|int|1|创建人ID|
|
|
|
|shopsType|int|1|店铺模式(1-单品店;2-多品店)|
|
|
|
|shopLogo|String|http://img11.static.yhbimg.com/yhb-img01/2015/09/11/02/01f42dff5d5bd383af1025eea1218cbccc.jpg?imageView/{mode}/w/{width}/h/{height}|店铺logo|
|
|
|
|shopIntro|String|秉承以设计为核心的创新理念,用专业的思维方式将自然与科技、传统与革新、技艺与时尚三者良好融合,着重面料材质与软式廓型的品质互动,更好的诠释“less is more”的设计理念。|店铺简介|
|
|
|
|websiteUrl|JSON数组|["www.paperworks.com.cn"]||
|
|
|
|otherUrl|JSON数组|["www.paperworks.com.cn","https:\/\/jnby.tmall.com\/"]||
|
|
|
|shopAddress|JSON数组|||
|
|
|
|onCheck|int|1|是否需要审核(1-是;0-否)|
|
|
|
|shopRelation|JSON数组||品牌与供应商关系|
|
|
|
---------------------
|
|
|
|
|
|
shopRelation的json格式为:
|
|
|
``` json
|
|
|
|
|
|
"shopRelation":[
|
|
|
{
|
|
|
"brandId":355,
|
|
|
"supplierId":310,
|
|
|
"agreementEndTime":1485792000
|
|
|
},
|
|
|
{
|
|
|
"brandId":1389,
|
|
|
"supplierId":1226,
|
|
|
"agreementEndTime":1482076800
|
|
|
}
|
|
|
]
|
|
|
```
|
|
|
|
|
|
### 返回
|
|
|
返回码code为200就是成功,其余为失败。
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":500
|
|
|
"message":"Sorry,域名已存在"
|
|
|
"code": 200,
|
|
|
"message": "success."
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## 根据店铺名查看是否存在
|
|
|
---------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
> 接口名:`/shops/checkByShopName`
|
|
|
## 关店
|
|
|
|
|
|
> 接口名: `/ShopsRest/closeShops`
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|shopName|String|得宝旗舰店|店铺名称|
|
|
|
|shopsId|int|15|店铺ID|
|
|
|
-------------------
|
|
|
-----------------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
```json
|
|
|
|
|
|
{
|
|
|
"code":500,
|
|
|
"message":"shop_name is null"
|
|
|
}
|
|
|
{
|
|
|
"code":500,
|
|
|
"message":"shops_id is null"
|
|
|
}
|
|
|
{
|
|
|
"code":400,
|
|
|
"message":"false"
|
|
|
}
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"true"
|
|
|
"code": 200,
|
|
|
"message": "操作成功"
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
---------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
## 根据店铺域名查看是否存在
|
|
|
## 开店
|
|
|
|
|
|
> 接口名: `/shops/checkByShopDomain`
|
|
|
> 接口名: `/ShopsRest/openShops`
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|shopDomain|String|debao|店铺域名|
|
|
|
|shopsId|int|15|店铺ID|
|
|
|
-----------------------------
|
|
|
|
...
|
...
|
@@ -260,27 +284,17 @@ shopLogo|String|http://img11.static.yhbimg.com/yhb-img01/2015/09/11/02/01f42dff5 |
|
|
```json
|
|
|
|
|
|
{
|
|
|
"code":500,
|
|
|
"message":"shop_name is null"
|
|
|
}
|
|
|
{
|
|
|
"code":500,
|
|
|
"message":"shops_id is null"
|
|
|
}
|
|
|
{
|
|
|
"code":400,
|
|
|
"message":"false"
|
|
|
}
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"true"
|
|
|
"code": 200,
|
|
|
"message": "操作成功"
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
## 获取店铺详情
|
|
|
---------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
> 接口名: `/shops/getDetailByShopId`
|
|
|
## 审核通过
|
|
|
|
|
|
> 接口名: `/ShopsRest/checkShopPass`
|
|
|
|
|
|
### 入参
|
|
|
|
...
|
...
|
@@ -295,67 +309,67 @@ shopLogo|String|http://img11.static.yhbimg.com/yhb-img01/2015/09/11/02/01f42dff5 |
|
|
```json
|
|
|
|
|
|
{
|
|
|
"code":400,
|
|
|
"message":"店铺id有误"
|
|
|
"code": 200,
|
|
|
"message": "操作成功"
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
---------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
## 审核拒绝
|
|
|
|
|
|
> 接口名: `/ShopsRest/checkReject`
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|shopsId|int|15|店铺ID|
|
|
|
-----------------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
```json
|
|
|
|
|
|
{
|
|
|
"code":400,
|
|
|
"message":"shopInfo is none"
|
|
|
"code": 200,
|
|
|
"message": "操作成功"
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
## 根据品牌id,获取品牌供应商关系(可用的供应商,并且是合同有效的)
|
|
|
|
|
|
> 接口名: `/supplier/supplier/selectSupplierByBrandId`
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|brandId|int|15|品牌ID|
|
|
|
-----------------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
```json
|
|
|
|
|
|
{
|
|
|
"code":200
|
|
|
"message":"ok"
|
|
|
"data":
|
|
|
{
|
|
|
"code": 200,
|
|
|
"data": [
|
|
|
{
|
|
|
"shopsId": 15,
|
|
|
"shopName": "",
|
|
|
"shopDomain": "",
|
|
|
"shopNature": "",
|
|
|
"shopLogo": "",
|
|
|
"websiteUrl": "",
|
|
|
"shopAddress": "",
|
|
|
"createPid": "",
|
|
|
"checkStatus": "",
|
|
|
"createTime": "",
|
|
|
"updateTime": "",
|
|
|
"status": ""
|
|
|
},
|
|
|
"shopsAdmin": [{
|
|
|
"id": "",
|
|
|
"shopsId": "",
|
|
|
"adminPid": "",
|
|
|
"identity": "",
|
|
|
"createTime": "",
|
|
|
"updateTime": ""
|
|
|
},{
|
|
|
"id": "",
|
|
|
"shopsId": "",
|
|
|
"adminPid": "",
|
|
|
"identity": "",
|
|
|
"createTime": "",
|
|
|
"updateTime": ""
|
|
|
}],
|
|
|
"shopRelation": [{
|
|
|
"id": "",
|
|
|
"shopsId": "",
|
|
|
"brandId": "",
|
|
|
"supplierId": "",
|
|
|
"createTime": "",
|
|
|
"updateTime": "",
|
|
|
"agreementEndTime": ""
|
|
|
},{
|
|
|
"id": "",
|
|
|
"shopsId": "",
|
|
|
"brandId": "",
|
|
|
"supplierId": "",
|
|
|
"createTime": "",
|
|
|
"updateTime": "",
|
|
|
"agreementEndTime": ""
|
|
|
}]
|
|
|
}
|
|
|
"agreementEndTime": "2016-10-31",
|
|
|
"brandId": 1409,
|
|
|
"supplierId": 1147,
|
|
|
"supplierName": "北京尚视科技有限公司"
|
|
|
}
|
|
|
],
|
|
|
"message": "操作成功"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
|
|
|
``` |
...
|
...
|
|