Authored by chenchao

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

... ... @@ -10,8 +10,8 @@
|参数名 |必填 |类型 |示例值 |描述 |
|------ |---- |---- |------ |---- |
|name |否 |string |男首页 |资源名称 |
|sort_id |否 |int |2 |分类编号 |
|platform_id|否 |int |1 |平台编号 |
|sortId |否 |int |2 |分类编号 |
|platformId |否 |int |1 |平台编号 |
|page |否 |int |1 |页数 |
#### 返回
... ... @@ -28,28 +28,28 @@
{
"id":8,
"name":"男首页",
"sort_id":2,
"sort_name":"男首",
"platform_id":1,
"platform_name":"yohoApp",
"sortId":2,
"sortName":"男首",
"platformId":1,
"platformName":"yohoApp",
"code":"201504091403001",
"match_code":"",
"create_time":1430378310,
"sort_list":[
"matchCode":"",
"createTime":1430378310,
"sorts":[
{
"sort_id":2,
"sort_name":"男首",
"platform_id":"1",
"create_time":1430304722,
"sortId":2,
"sortName":"男首",
"platformId":"1",
"createTime":1430304722,
"status":1
}
],
"plat_list":[
"platforms":[
{
"platform_id":1,
"platform_name":"yohoApp",
"platform_flag":"iphone",
"create_time":1430300615,
"platformId":1,
"platformName":"yohoApp",
"platformFlag":"iphone",
"createTime":1430300615,
"status":1
}
]
... ... @@ -69,12 +69,12 @@
|content |内容 |
|id |资源编号 |
|name |资源名称 |
|sort_id |分类编号 |
|sort_name |分类名称 |
|platform_id|平台编号 |
|platform_name|平台名称 |
|sortId |分类编号 |
|sortName |分类名称 |
|platformId |平台编号 |
|platformName|平台名称 |
|code |资源码 |
|match_code |配对码 |
|create_time|创建时间 |
|sort_list |分类列表 |
|plat_list |平台列表 |
\ No newline at end of file
|matchCode |配对码 |
|createTime |创建时间 |
|sorts |分类列表 |
|platforms |平台列表 |
\ No newline at end of file
... ...
# 产品颜色管理接口服务定义
# 文件上传接口服务定义
---------------------
# 添加颜色接口
> 接口名: `/productColor/addProductColor/`
> 接口名: `/fileupload/upload/`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|colorName|string|nike|颜色名称|是|
|colorCode|string|n|RGB code|是|
|colorValue|string|图片URL|一级分类|是|
|file|file|-|颜色名称|是|
|userId|int|543883|用户id|是|
|bucket|string|smart|bucket|是|
---------------------
... ... @@ -21,106 +22,9 @@
``` json
{
"code":200,
"data" : "url", --图片URL
"message":"success"
}
```
# 获取颜色列表
> 接口名: `/productColor/queryProductColors`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|-------|----|----|----|-------|
--------------------------------
### 返回
``` json
{
code:200,
message:"",
data: {
list: [{
categoryName: '', //品类名称
categoryAbbr: '', //品类缩写
firstCategory: '', //一级分类
secondCategory: '', //二级分类
thirdCategory: '', //三级分类
categorySort: '', //排序
categoryStatus: '',//状态,
id: '', //品类ID
}]
page: '', //当前第几页
size: '', //每页多少条
}
}
```
# 更新产品颜色接口
> 接口名: `/product/updateProductAttribute`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|id |int|1 |id |是 |
|colorName|string|nike|颜色名称|是|
|colorCode|string|n|RGB code|是|
|colorValue|string|图片URL|一级分类|是|
---------------------
### 返回
``` json
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "Product Attribute update success."
}
```
# 获取单个产品颜色接口
> 接口名: `/product/queryProductColor`
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|param|int|1|颜色ID|是
---------------------
### 返回
``` json
{
"code": 200,
"data": {
"colorCode": "cc",
"colorName": "hongse",
"colorValue": "cc-value",
"id": 16
},
"md5": "d08f272cd425a5a89528299e5ab9ebdf",
"message": "success"
}
```
... ...
... ... @@ -10,9 +10,9 @@
-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|colorName|string|nike|颜色名称|是|
|colorCode|string|n|RGB code|是|
|colorValue|string|图片URL|一级分类|是|
|colorName|string|X色|颜色名称|是|
|colorCode|string|FFFF|RGB code|是|
|colorValue|string|www.io.png|图片URL|是|
---------------------
... ... @@ -143,9 +143,9 @@
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|id |int|1 |id |是 |
|colorName|string|nike|颜色名称|是|
|colorCode|string|n|RGB code|是|
|colorValue|string|图片URL|一级分类|是|
|colorName|string|X色|颜色名称|是|
|colorCode|string|000fff|RGB code|是|
|colorValue|string|www.meili.png|图片URL|是|
---------------------
### 返回
... ...
## 1.数据库(erp_supplier)
### 1.1 店铺管理员(erp_supplier.shops_admin)
#### sql 脚本
```sql
CREATE TABLE `shops_admin` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`shops_id` int(11) unsigned NOT NULL,
`admin_pid` int(11) unsigned NOT NULL,
`identity` tinyint(3) unsigned DEFAULT '1' COMMENT '1、店长 2、供应商 3、店员',
`create_time` int(10) unsigned NOT NULL DEFAULT '0',
`update_time` int(10) unsigned NOT NULL DEFAULT '0',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1、正常 2、已删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=836 DEFAULT CHARSET=utf8;
```
#### 说明:增加标识字段status 1 表示正常记录 2 表示已删除记录
\ No newline at end of file
... ...
... ... @@ -3,10 +3,15 @@
## 获取店铺管理员列表
> 接口名:`/shops/getShopsAdminList`
> 接口名:`/ShopsAdminRest/getShopsAdminList`
### 入参
``` json
{
"page":2,
"size":12
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
... ... @@ -18,26 +23,157 @@
``` json
{
"code":200,
"message":"list",
"data":{
"code": 200,
"data": {
"list": [
{
"adminName": "",
"adminPid": 10180,
"createTime": "2016-01-14 11:03:44",
"id": 822,
"identity": 1,
"shopName": "MO&Co.",
"shopsId": 420,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "成凤驹",
"adminPid": 2738,
"createTime": "2016-01-11 16:49:32",
"id": 820,
"identity": 7,
"shopName": "Faroma",
"shopsId": 430,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "朱云青",
"adminPid": 2314,
"createTime": "2016-01-11 16:49:15",
"id": 819,
"identity": 7,
"shopName": "Faroma",
"shopsId": 430,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "",
"adminPid": 10040,
"createTime": "2016-01-11 16:48:37",
"id": 818,
"identity": 6,
"shopName": "朴坊Simplemill",
"shopsId": 319,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "",
"adminPid": 2944,
"createTime": "2016-01-11 16:47:27",
"id": 817,
"identity": 7,
"shopName": "WWTorres",
"shopsId": 429,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "朱云青",
"adminPid": 2314,
"createTime": "2016-01-11 16:47:15",
"id": 816,
"identity": 7,
"shopName": "WWTorres",
"shopsId": 429,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "",
"adminPid": 3161,
"createTime": "2016-01-08 15:21:11",
"id": 815,
"identity": 7,
"shopName": "MO&Co.edition",
"shopsId": 426,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "",
"adminPid": 3069,
"createTime": "2016-01-08 15:20:58",
"id": 814,
"identity": 7,
"shopName": "MO&Co.edition",
"shopsId": 426,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "",
"adminPid": 10172,
"createTime": "2016-01-08 14:00:53",
"id": 813,
"identity": 7,
"shopName": "ELECOM 宜丽客",
"shopsId": 421,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "朱云青",
"adminPid": 2314,
"createTime": "2016-01-08 14:00:37",
"id": 812,
"identity": 7,
"shopName": "ELECOM 宜丽客",
"shopsId": 421,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "",
"adminPid": 3161,
"createTime": "2016-01-08 13:23:48",
"id": 811,
"identity": 7,
"shopName": "MO&Co.",
"shopsId": 420,
"updateTime": "1970-01-01 08:00:00"
},
{
"adminName": "",
"adminPid": 3069,
"createTime": "2016-01-08 13:23:32",
"id": 810,
"identity": 7,
"shopName": "MO&Co.",
"shopsId": 420,
"updateTime": "1970-01-01 08:00:00"
}
],
"page": 2,
"size": 12,
"total": 803,
"totalPage": 67
},
"message": "操作成功"
}
```
## 添加店铺管理员关系
> 接口名: `/shops/addAdminRelation`
> 接口名: `/ShopsAdminRest/addAdminRelation`
### 入参
```json
{
"shopsId":15,
"adminPid":2,
"identity":12
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|shopsId|int|15|店铺ID|
|adminPid|int|2951|管理员ID|
|identity|int|1|身份(1、店长 2、供应商 3、店员)|
|identity|int|1|身份(1、品牌公司 2、品牌经销商3、品牌代运营商4、有货品牌经理 5、有货店铺运营 6、有货商品运营7、有货平台运营) 可选 默认为1|
---------------------------
### 返回
... ... @@ -45,11 +181,11 @@
```json
{
"code":500
"message":"shops_id is null"
"message":"shopsId is null"
}
{
"code":500
"message":"admin_pid is null"
"message":"adminPid is null"
}
{
"code":500
... ... @@ -67,15 +203,18 @@
```
## 删除店铺管理员关系
> 接口名: `/shops/delAdminRelation`
> 接口名: `/ShopsAdminRest/delAdminRelation`
### 入参
```json
{
"id":24
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|id|int|20|店铺管理员记录ID|
|shopsId|int|15|店铺ID|
---------------------------
### 返回
... ... @@ -93,15 +232,18 @@
## 获取管理员关系详情
> 接口名:`/shops/getAdminRelationDetailById`
> 接口名:`/ShopsAdminRest/getAdminRelationDetailById`
### 入参
```json
{
"id":20
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|id|int|20|店铺管理员记录ID|
|shopsId|int|15|店铺ID|
-------------------
### 返回
... ... @@ -113,33 +255,43 @@
}
{
"code":500,
"message":"shops_id is null"
}
{
"code":500,
"message":"暂无数据"
}
{
"code":200,
"message":"list",
"data":{
}
"code": 200,
"data": {
"adminPid": 2951,
"createTime": 1441937052,
"id": 20,
"identity": 7,
"shopsId": 15,
"updateTime": 0
},
"message": "list"
}
```
## 修改店铺管理员关系
> 接口名: `/shops/updateAdminRalation`
> 接口名: `/ShopsAdminRest/updateAdminRalation`
### 入参
```json
{
"id":20,
"shopsId":15,
"adminPid":2951,
"identity":2
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|shopDomain|String|debao|店铺域名|
|id|int|20|店铺管理员记录ID|
|shopsId|int|15|店铺ID|
|adminPid|int|2951|管理员ID|
|identity|int|1|身份(1、品牌公司 2、品牌经销商3、品牌代运营商4、有货品牌经理 5、有货店铺运营 6、有货商品运营7、有货平台运营) 可选 默认为1|
-----------------------------
### 返回
... ... @@ -151,11 +303,11 @@
}
{
"code":500
"message":"shops_id is null"
"message":"shopsId is null"
}
{
"code":500
"message":"admin_pid is null"
"message":"adminPid is null"
}
{
"code":500
... ... @@ -168,3 +320,224 @@
```
## 根据身份获取用户
> 接口名: `/ShopsAdminRest/getUsersByIdentity`
### 入参
```json
{
"identity":1
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
|identity|int|1|身份(1、品牌公司 2、品牌经销商3、品牌代运营商4、有货品牌经理 5、有货店铺运营 6、有货商品运营7、有货平台运营)|
-----------------------------
### 返回
```json
{
"code":440
"message":"身份不存在!"
}
{
"code":200
"message":"0"
}
{
"code":200
"message":"null"
}
{
"code":500
"message":"该关系已存在"
}
{
"code": 200,
"data": [
{
"identity": 1,
"identityCn": "品牌公司",
"pid": 100001,
"supplierId": 0,
"truename": "tuk"
},
{
"identity": 1,
"identityCn": "品牌公司",
"pid": 100002,
"supplierId": 0,
"truename": "test9"
},
{
"identity": 1,
"identityCn": "品牌公司",
"pid": 100008,
"supplierId": 0,
"truename": "小松鼠"
},
{
"identity": 1,
"identityCn": "品牌公司",
"pid": 100010,
"supplierId": 0,
"truename": "Z"
},
{
"identity": 1,
"identityCn": "品牌公司",
"pid": 100016,
"supplierId": 0,
"truename": "AAA"
}
],
"message": "all user"
}
```
## 获取所有身份
> 接口名: `/EnumListRest/getEnumList`
### 入参
-----------------------------
### 返回
```json
"IdentityEnum": [
{
"name": "品牌公司",
"value": 1
},
{
"name": "品牌经销商",
"value": 2
},
{
"name": "品牌代运营商",
"value": 3
},
{
"name": "有货品牌经理",
"value": 4
},
{
"name": "有货店铺运营",
"value": 5
},
{
"name": "有货商品运营",
"value": 6
},
{
"name": "有货平台运营",
"value": 7
}
```
其中:key为IdentityEnum
```json
{
"code": 200,
"data": {
"CheckStatusEnum": [
{
"name": "暂存",
"value": 100
},
{
"name": "审核中",
"value": 200
},
{
"name": "通过",
"value": 300
},
{
"name": "驳回",
"value": 900
}
],
"IdentityEnum": [
{
"name": "品牌公司",
"value": 1
},
{
"name": "品牌经销商",
"value": 2
},
{
"name": "品牌代运营商",
"value": 3
},
{
"name": "有货品牌经理",
"value": 4
},
{
"name": "有货店铺运营",
"value": 5
},
{
"name": "有货商品运营",
"value": 6
},
{
"name": "有货平台运营",
"value": 7
}
],
"ShopNatureEnum": [
{
"name": "旗舰店",
"value": 1
},
{
"name": "专卖店",
"value": 2
}
],
"ShopOperationStatusEnum": [
{
"name": "店铺未创建",
"value": 1
},
{
"name": "店铺已创建",
"value": 2
}
],
"ShopsTypeEnum": [
{
"name": "单品店",
"value": 1
},
{
"name": "多品店",
"value": 2
}
],
"StatusEnum": [
{
"name": "关闭",
"value": 0
},
{
"name": "开启",
"value": 1
},
{
"name": "已删除",
"value": 2
}
]
},
"message": "操作成功"
}
```
\ No newline at end of file
... ...
# 店铺接口服务定义
---------------------
## 创建店铺
> 接口名:`/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": "操作成功"
}
```
```
... ...
... ... @@ -3,10 +3,30 @@
## 添加店铺审核
> 接口名:`/shops/addCheckShop`
> 接口名:`/ShopsCheckRest/addCheckShop`
### 入参
``` json
{
"shopsId":15,
"shopName":"得宝旗舰店",
"shopNature":1,
"shopDomain":"debao",
"shopRelation":[{
"brandId":355,
"supplierId":310,
"agreementEndTime":1485792000,
"method":"add"
},
{
"brandId":178,
"supplierId":480,
"agreementEndTime":1459353600,
"method":"del"
}],
"createPid":"1"
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
... ... @@ -25,6 +45,34 @@
|status|int|0|状态(1 开启 0 关闭)|
|createTime|int|1441936854|添加时间|
|updateTime|int|1442312299|修改时间|
注意:入参中`shopRelation`的json格式,如下:
```javascript
[{
"brandId":355,
"supplierId":310,
"agreementEndTime":1485792000,
"method":"add"
},
{
"brandId":178,
"supplierId":480,
"agreementEndTime":1459353600,
"method":"del"
}]
```
`websiteUrl`的json格式,如下:
```javascript
["网址1","网址2"]
```
`otherUrl`的json格式,如下:
```javascript
["网址1","网址2"]
```
`shopAddress`的json格式,如下:
```javascript
["地址1","地址2"]
```
---------------------
### 返回
... ... @@ -32,11 +80,31 @@
``` json
{
"code":400
"message":"店铺已经在审核中"
"message":"shopsId is required"
}
{
"code":500
"message":"操作成功"
"code":400
"message":"shopName is required"
}
{
"code":400
"message":"shopNature is required"
}
{
"code":400
"message":"shopDomain is required"
}
{
"code":400
"message":"shopRelation is required"
}
{
"code":400
"message":"createPid is required"
}
{
"code":400
"message":"店铺已经在审核中"
}
{
"code":200
... ... @@ -46,10 +114,14 @@
## 获取查看审核详情
> 接口名: `/shops/getCheckShopInfo`
> 接口名: `/ShopsCheckRest/getCheckShopInfo`
### 入参
```json
{
"shopsId":20
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
... ... @@ -68,20 +140,41 @@
"message":"暂无数据"
}
{
"code":200,
"message":"ok",
"data":{
}
"code": 200,
"data": {
"createPid": 1,
"createTime": 1454205517,
"examineStatus": 0,
"isRead": 1,
"operationStatus": 1,
"otherUrl": "",
"shopAddress": "",
"shopDomain": "debao",
"shopIntro": "",
"shopLogo": "",
"shopName": "得宝旗舰店",
"shopNature": 0,
"shopRelation": "[{\"agreementEndTime\":1485792000,\"brandId\":355,\"method\":\"add\",\"supplierId\":310},{\"agreementEndTime\":1459353600,\"brandId\":178,\"method\":\"del\",\"supplierId\":480}]",
"shopsId": 15,
"shopsType": 1,
"status": 0,
"updateTime": 1454205517,
"websiteUrl": ""
},
"message": "ok"
}
```
## 审核通过
> 接口名: `/shops/allowShop`
> 接口名: `/ShopsCheckRest/allowShop`
### 入参
```json
{
"shopsId":15
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
... ... @@ -111,10 +204,13 @@
## 审核驳回
> 接口名:`/shops/rejectShop`
> 接口名:`/ShopsCheckRest/rejectShop`
### 入参
```json{
"shopsId":15
}
```
-------------------------
|属性名称|类型|例子|说明|
|--------|----|----|----|
... ...