Authored by wei

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

# 商家端店铺接口
## 查询店铺下关联品牌
> /MerchantShopsRest/queryMerchantBrandByShopsId
### 返回
```json
{
"code": 200,
"data": [
{
// 品牌 ID
"id": 928,
// 品牌名称
"text": "得宝"
}
],
"message": "店铺下关联品牌"
}
```
## 查询店铺下关联供应商
> /MerchantShopsRest/queryMerchantSupplierByShopsId
### 返回
```json
{
"code": 200,
"data": [
{
// 供应商
"id": 950,
// 供应商名称
"text": "德宝纸巾有限公司"
}
],
"md5": "44001c519d1dd9d395521c46606534e9",
"message": "操作成功"
}
```
# 商家端店铺接口
## 查询店铺下关联品牌
> 接口名:/MerchantShopsRest/queryMerchantBrandByShopsId
### 公共参数
``` json
{
"x-shop-id":"145"
}
```
-------------------------
|属性名称|类型|例子|说明|是否必填|长度限制|
|--------|----|----|----|-----|----|
|x-shop-id|String|"145"|店铺ID,站点类型为2(商家平台)|是|无|
---------------------
### 1. 对应SQL的操作库表(数据库 erp_supplier,表 shops_brands)
```xml
<select id="selectMerchantBrandByShopsId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from shops_brands
where shops_id = #{shopsId,jdbcType=INTEGER} and status=1
</select>
```
### 2. 对应SQL的操作库表(数据库 erp_product,表 brand)
```xml
<select id="selectBrandsByBrandIds" resultMap="BaseResultMap">
<bind name="size" value="@com.yohobuy.platform.common.util.SqlUtils@getSize(brandIds)" />
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from brand
<where>
<if test="brandIds !=null and size!=0">
id in
<foreach collection="brandIds" item="brandId" open="(" separator="," close=")">
#{brandId}
</foreach>
</if>
</where>
</select>
```
### 错误编码
-------------------------
|错误码code|消息|说明|
|----------|----|----|
|400|店铺下没有关联品牌||
|400|店铺下没有关联品牌||
|200|店铺下关联品牌||
### 返回
```json
{
"code": 200,
"data": [
{
// 品牌 ID
"id": 928,
// 品牌名称
"text": "得宝"
}
],
"message": "店铺下关联品牌"
}
```
## 查询店铺下关联供应商
> 接口名: /MerchantShopsRest/queryMerchantSupplierByShopsId
### 公共参数
``` json
{
"x-shop-id":"145"
}
```
-------------------------
|属性名称|类型|例子|说明|是否必填|长度限制|
|--------|----|----|----|-----|----|
|x-shop-id|String|"145"|店铺ID,站点类型为2(商家平台)|是|无|
---------------------
### 1. 对应SQL的操作库表(数据库 erp_supplier,表 shops_brands)
```xml
<select id="selectMerchantSupplierByShopsId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from shops_brands
where shops_id = #{shopsId,jdbcType=INTEGER} and status=1
</select>
```
### 2. 对应SQL的操作库表(数据库 erp_supplier,表 supplier)
```xml
<select id="selectBySupplierIds" resultMap="BaseResultMap">
<bind name="size" value="@com.yohobuy.platform.common.util.SqlUtils@getSize(supplierIds)" />
select
<include refid="Base_Column_List" />
from supplier
where is_freeze = 'N'
<if test="supplierIds !=null and size!=0">
and id in
<foreach collection="supplierIds" item="supplierId" open="(" close=")" separator=",">
#{supplierId,jdbcType=INTEGER}
</foreach>
</if>
</select>
```
### 错误编码
-------------------------
|错误码code|消息|说明|
|----------|----|----|
|无|无|无|
### 返回
```json
{
"code": 200,
"data": [
{
// 供应商
"id": 950,
// 供应商名称
"text": "德宝纸巾有限公司"
}
],
"md5": "44001c519d1dd9d395521c46606534e9",
"message": "操作成功"
}
```
... ...