Authored by chaogeng

update

## 编辑plustar分类接口
> 接口名: '/guang/plustar/updatePlustar'
### 方法
> POST JSONRAW
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|范围|
|--------|----|----|----|----|----|
|id|String|450|plustar ID|是||
|brandId|String|30|品牌id|否||
|brandType|String|1|频道id|否||
|coverImg|String|http://img12.static.yhbimg.com/yhb-img01/2016/03/28/08/02a4da74a108380e93a33dc5eb91b42f2f.jpg|封面图|否||
|bannerImg|String[]|["http://img12.static.yhbimg.com/yhb-img01/2016/03/28/08/02a4da74a108380e93a33dc5eb91b42f2f.jpg?imageView/2/w/300/h/300"]|banner图|否||
|bannerTitle|String|广泛丰厚的|banner标签|否||
|orderBy|String|23|排序|否||
|gender|String|1|性别|否||
|status|String|1|是否可用|否||
---------------------
### 对应SQL的操作库表
```xml
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from brand_relation
where id = #{id,jdbcType=INTEGER}
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.yohobuy.platform.dal.guang.model.BrandRelation" >
update brand_relation
<set >
<if test="brandId != null" >
brand_id = #{brandId,jdbcType=INTEGER},
</if>
<if test="brandType != null" >
brand_type = #{brandType,jdbcType=TINYINT},
</if>
<if test="coverImg != null" >
cover_img = #{coverImg,jdbcType=VARCHAR},
</if>
<if test="bannerTitle != null" >
banner_title = #{bannerTitle,jdbcType=VARCHAR},
</if>
<if test="isRecommend != null" >
is_recommend = #{isRecommend,jdbcType=TINYINT},
</if>
<if test="orderBy != null" >
order_by = #{orderBy,jdbcType=SMALLINT},
</if>
<if test="isDifferent != null" >
is_different = #{isDifferent,jdbcType=BIT},
</if>
<if test="gender != null" >
gender = #{gender,jdbcType=CHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=BIT},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=INTEGER},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<delete id="deleteByRelationId" parameterType="java.lang.Integer" >
delete from brand_img
where relation_id = #{relationId,jdbcType=INTEGER}
</delete>
<insert id="insertBatch" parameterType="java.util.List" >
insert into brand_img (relation_id, banner_img)
values
<foreach collection="list" item="item" separator=",">
(#{item.relationId}, #{item.bannerImg})
</foreach>
</insert>
```
### 错误编码
-------------------------
|错误码code|消息|说明|
|--------|----|----|
|400| plustar is null| |
|400| 没有找到该品牌关系| |
|500| 插入banner图片失败| |
|200| 修改成功!| |
|400| 修改失败!| |
### 返回
``` json
{
"code":200,
"message":"修改成功!"
}
## 编辑plustar分类接口
> 接口名: '/guang/plustar/updatePlustar'
### 方法
> POST JSONRAW
### 入参
-------------------------
|属性名称|类型|例子|说明|是否必填|范围|
|--------|----|----|----|----|----|
|id|String|450|plustar ID|是|1-10|
|brandId|String|30|品牌id|是|1-10|
|brandType|String|1|频道id|是|1-1|
|coverImg|String|http://img12.static.yhbimg.com/yhb-img01/2016/03/28/08/02a4da74a108380e93a33dc5eb91b42f2f.jpg|封面图|是|1-85|
|bannerImg|String[]|["http://img12.static.yhbimg.com/yhb-img01/2016/03/28/08/02a4da74a108380e93a33dc5eb91b42f2f.jpg?imageView/2/w/300/h/300"]|banner图|否|-|
|bannerTitle|String|广泛丰厚的|banner标签|否|0-85|
|orderBy|String|23|排序|否|0-6|
|gender|String|1|性别|否|0-1|
|status|String|1|是否可用|否|0-1|
---------------------
### 对应SQL的操作库表
```xml
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from brand_relation
where id = #{id,jdbcType=INTEGER}
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.yohobuy.platform.dal.guang.model.BrandRelation" >
update brand_relation
<set >
<if test="brandId != null" >
brand_id = #{brandId,jdbcType=INTEGER},
</if>
<if test="brandType != null" >
brand_type = #{brandType,jdbcType=TINYINT},
</if>
<if test="coverImg != null" >
cover_img = #{coverImg,jdbcType=VARCHAR},
</if>
<if test="bannerTitle != null" >
banner_title = #{bannerTitle,jdbcType=VARCHAR},
</if>
<if test="isRecommend != null" >
is_recommend = #{isRecommend,jdbcType=TINYINT},
</if>
<if test="orderBy != null" >
order_by = #{orderBy,jdbcType=SMALLINT},
</if>
<if test="isDifferent != null" >
is_different = #{isDifferent,jdbcType=BIT},
</if>
<if test="gender != null" >
gender = #{gender,jdbcType=CHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=BIT},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=INTEGER},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<delete id="deleteByRelationId" parameterType="java.lang.Integer" >
delete from brand_img
where relation_id = #{relationId,jdbcType=INTEGER}
</delete>
<insert id="insertBatch" parameterType="java.util.List" >
insert into brand_img (relation_id, banner_img)
values
<foreach collection="list" item="item" separator=",">
(#{item.relationId}, #{item.bannerImg})
</foreach>
</insert>
```
### 错误编码
-------------------------
|错误码code|消息|说明|
|--------|----|----|
|400| plustar is null| |
|400| 没有找到该品牌关系| |
|500| 插入banner图片失败| |
|200| 修改成功!| |
|400| 修改失败!| |
### 返回
``` json
{
"code":200,
"message":"修改成功!"
}
```
\ No newline at end of file
... ...