Showing
1 changed file
with
54 additions
and
0 deletions
api-doc/guang/article/getAuthorList.md
0 → 100644
1 | +# 获取作者列表接口 | ||
2 | + | ||
3 | +> 接口名: `/guang/article/getAuthorList` | ||
4 | + | ||
5 | +### 方法 | ||
6 | + | ||
7 | +> GET | ||
8 | + | ||
9 | +### 入参 | ||
10 | + | ||
11 | +------------------------- | ||
12 | +|属性名称|类型|例子|说明| | ||
13 | +|--------|----|----|----| | ||
14 | +|idName|String|8168248|作者ID或姓名| | ||
15 | +--------------------- | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | +### 对应SQL的操作库表 | ||
20 | + | ||
21 | +```xml | ||
22 | + <select id="selectByIdName" resultMap="IdNameMap"> | ||
23 | + select uid, username from author | ||
24 | + <if test="idName != null and idName != ''"> | ||
25 | + where uid like CONCAT('%',#{idName},'%') | ||
26 | + or username like CONCAT('%',#{idName},'%') | ||
27 | + </if> | ||
28 | + order by create_time desc limit #{limit} | ||
29 | + </select> | ||
30 | +``` | ||
31 | + | ||
32 | +### 错误编码 | ||
33 | + | ||
34 | +------------------------- | ||
35 | +|错误码code|消息|说明| | ||
36 | +|--------|----|----| | ||
37 | +|200| 操作成功| | | ||
38 | + | ||
39 | +### 返回 | ||
40 | + | ||
41 | +``` json | ||
42 | +{ | ||
43 | + "code":200, | ||
44 | + "message":"操作成功", | ||
45 | + "data": [ | ||
46 | + { | ||
47 | + "id": "8168248", | ||
48 | + "text":"DREAMER" | ||
49 | + } | ||
50 | + ] | ||
51 | + | ||
52 | +} | ||
53 | + | ||
54 | +``` |
-
Please register or login to post a comment