|
|
# 修改资讯分类资源
|
|
|
|
|
|
> 接口名: `/guang/article/sort/updateSort
|
|
|
|
|
|
### 方法
|
|
|
|
|
|
> POST
|
|
|
|
|
|
### 入参
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|name|String|流行|分类名称|
|
|
|
|status|Byte|1|状态|
|
|
|
|orderBy|Byte|3|排序|
|
|
|
|advertCode|String|324dfasf|广告码|
|
|
|
---------------------
|
|
|
|
|
|
|
|
|
### 对应SQL的操作库表
|
|
|
|
|
|
```
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yohobuy.platform.dal.guang.model.ArticleSort">
|
|
|
update article_sort
|
|
|
<set>
|
|
|
<if test="parentId > 0 or parentId = 0 ">
|
|
|
parent_id = #{parentId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
name = #{name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
status = #{status,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="orderBy != null">
|
|
|
order_by = #{orderBy,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="advertCode != null">
|
|
|
advert_code = #{advertCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
```
|
|
|
|
|
|
### 错误编码
|
|
|
|
|
|
-------------------------
|
|
|
|错误码code|消息|说明|
|
|
|
|--------|----|----|
|
|
|
|200|修改成功| |
|
|
|
|400|修改失败| |
|
|
|
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code": "200",
|
|
|
"message":"修改成功"
|
|
|
}
|
|
|
|
|
|
``` |
...
|
...
|
|