Authored by qianjun

update

... ... @@ -2,7 +2,55 @@
## 查询店铺下关联品牌
> /MerchantShopsRest/queryMerchantBrandByShopsId
> 接口名:/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|店铺下关联品牌||
### 返回
... ... @@ -23,7 +71,51 @@
## 查询店铺下关联供应商
> /MerchantShopsRest/queryMerchantSupplierByShopsId
> 接口名: /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|消息|说明|
|----------|----|----|
|无|无|无|
### 返回
... ...