Blame view

inferface-document/shops/shops.md 7.5 KB
ping authored
1 2 3 4 5
# 店铺接口服务定义
---------------------


## 获取店铺列表
ping authored
6
> 接口名: `/ShopsRest/getShopList`
ping authored
7 8 9 10 11 12 13 14 15 16

### 入参

-------------------------
|属性名称|类型|例子|说明| 
|--------|----|----|----|
|page|int|2|第几页|
|size|int|50|每页条数|
|supplierId|int|950|供应商ID|
|brandId|int|928|品牌ID|
ping authored
17 18 19
|checkStatus|int|928|审核状态;100 暂存 200 待审核 300 审核通过 900 驳回|
|operationStatus|int|1|操作状态; 1 店铺未创建 2 店铺已创建|
|checkStatusArr|String|200,300|必须包含的状态|
ping authored
20 21
---------------------------
ping authored
22
ping authored
23 24 25 26 27
### 返回

```json

{
ping authored
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
  "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
          }
        ],
        "shopsId": 31,
        "status": 1,
        "updateTime": "2015-12-08 19:20:44"
      }
    ],
    "page": 1,
    "size": 10,
    "total": 79,
    "totalPage": 8
  },
  "message": "操作成功"
ping authored
57 58 59
}
```
ping authored
60
---------------------------------------------------------------------------------------------------------
ping authored
61 62 63

## 获取店铺详情
ping authored
64
> 接口名: `/ShopsRest/getShopDetailById`
ping authored
65 66 67 68 69 70 71 72 73 74 75 76 77 78

### 入参

-------------------------
|属性名称|类型|例子|说明| 
|--------|----|----|----|
|shopsId|int|15|店铺ID|
-----------------------------

### 返回

```json

{
ping authored
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
  "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": [
      {
        "agreementEndTime": "2016-03-31 00:00:00",
        "brandId": 178,
        "brandName": "Artanky",
        "brandNameCn": "",
        "brandNameEn": "Artanky ",
        "brandStatus": 1,
        "isFreeze": "N",
        "supplierId": 480,
        "supplierName": "成都朋克汉堡服装有限公司",
        "supplierStatus": 300
      },
      {
        "agreementEndTime": "2017-01-31 00:00:00",
        "brandId": 355,
        "brandName": "TMCAZ",
        "brandNameCn": "磨叽星人",
        "brandNameEn": "TMCAZ",
        "brandStatus": 1,
        "isFreeze": "N",
        "supplierId": 310,
        "supplierName": "上海贺王工贸实业公司",
        "supplierStatus": 300
      },
      {
        "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": "操作成功"
ping authored
135 136 137 138
}
```

ping authored
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
## 创建店铺

> 接口名:`/ShopsRest/addShops`

### 入参

-------------------------
|属性名称|类型|例子|说明| 
|--------|----|----|----|
|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": 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": 200,
  "message": "success."
}
```

## 关店

> 接口名: `/ShopsRest/closeShops`

### 入参

-------------------------
|属性名称|类型|例子|说明| 
|--------|----|----|----|
|shopsId|int|15|店铺ID|
-----------------------------

### 返回

```json

{
  "code": 200,
  "message": "操作成功"
}

```

## 开店

> 接口名: `/ShopsRest/openShops`

### 入参

-------------------------
|属性名称|类型|例子|说明| 
|--------|----|----|----|
|shopsId|int|15|店铺ID|
-----------------------------

### 返回

```json

{
  "code": 200,
  "message": "操作成功"
}

```


## 审核通过

> 接口名: `/ShopsRest/checkShopPass`

### 入参

-------------------------
|属性名称|类型|例子|说明| 
|--------|----|----|----|
|shopsId|int|15|店铺ID|
-----------------------------

### 返回

```json

{
  "code": 200,
  "message": "操作成功"
}

```


## 审核拒绝

> 接口名: `/ShopsRest/checkReject`

### 入参

-------------------------
|属性名称|类型|例子|说明| 
|--------|----|----|----|
|shopsId|int|15|店铺ID|
-----------------------------

### 返回

```json

{
  "code": 200,
  "message": "操作成功"
}

```