Showing
1 changed file
with
60 additions
and
0 deletions
1 | +# 修改作者 | ||
2 | + | ||
3 | +> 接口名: `/guang/author/updateAuthor | ||
4 | + | ||
5 | +### 方法 | ||
6 | + | ||
7 | +> POST | ||
8 | + | ||
9 | +### 入参 | ||
10 | +------------------------- | ||
11 | +|属性名称|类型|例子|说明| | ||
12 | +|--------|----|----|----| | ||
13 | +|id|Integer|1|主键| | ||
14 | +|username|String|路遥|名称| | ||
15 | +|authorDesc|String|平凡世界。。。|描述| | ||
16 | +|avatar|String|http://img12.static.yhbimg.com/yhb-img02/2015/06/12/14/0220208c13de341448647b7eead758d592.jpg?imageView/{mode}/w/{width}/h/{height}|用户头像| | ||
17 | +--------------------- | ||
18 | + | ||
19 | + | ||
20 | +### 对应SQL的操作库表 | ||
21 | + | ||
22 | +``` | ||
23 | + <update id="updateByPrimaryKeySelective" parameterType="com.yohobuy.platform.dal.guang.model.Author" > | ||
24 | + update author | ||
25 | + <set > | ||
26 | + <if test="username != null" > | ||
27 | + username = #{username,jdbcType=VARCHAR}, | ||
28 | + </if> | ||
29 | + <if test="avatar != null" > | ||
30 | + avatar = #{avatar,jdbcType=VARCHAR}, | ||
31 | + </if> | ||
32 | + <if test="authorDesc != null" > | ||
33 | + author_desc = #{authorDesc,jdbcType=VARCHAR}, | ||
34 | + </if> | ||
35 | + <if test="createTime != null" > | ||
36 | + create_time = #{createTime,jdbcType=INTEGER}, | ||
37 | + </if> | ||
38 | + </set> | ||
39 | + where uid = #{uid,jdbcType=INTEGER} | ||
40 | + </update> | ||
41 | +``` | ||
42 | + | ||
43 | +### 错误编码 | ||
44 | + | ||
45 | +------------------------- | ||
46 | +|错误码code|消息|说明| | ||
47 | +|--------|----|----| | ||
48 | +|200|修改成功| | | ||
49 | +|400|修改失败| | | ||
50 | + | ||
51 | + | ||
52 | +### 返回 | ||
53 | + | ||
54 | +``` json | ||
55 | +{ | ||
56 | + "code": "200", | ||
57 | + "message":"修改成功" | ||
58 | +} | ||
59 | + | ||
60 | +``` |
-
Please register or login to post a comment