getList.md 2.4 KB

查询作者

接口名: /guang/author/getList

方法

GET

无参

对应SQL的操作库表

<select id="selectCount" resultType="java.lang.Integer" >
    select 
    IFNULL(count(1),0)
    from author
</select>
<select id="selectList" resultMap="BaseResultMap" >
    select 
    <include refid="Base_Column_List" />
    from author
    order by create_time DESC limit #{offset},#{limit}
</select>

错误编码


错误码code 消息 说明
200 操作成功

返回

json

{
    "code": 200,
    "data": [
        {
            "id": "1",
            "username": "cccccc",
            "avatar":"http://img12.static.yhbimg.com/yhb-img02/2015/06/12/12/02aafe4efc368f307c02b692cf1f862570.jpg?imageView/{mode}/w/{width}/h/{height}",
            "authorDesc":"一个伟大的作家啊",
            "articleCount":"3"
        },
        {
            "id": "2",
            "username": "bbbb",
            "avatar":"http://img12.static.yhbimg.com/yhb-img02/2015/06/12/12/02aafe4efc368f307c02b692cf1f862570.jpg?imageView/{mode}/w/{width}/h/{height}",
            "authorDesc":"一个伟大的作家啊",
            "articleCount":"3"
        },
        {
            "id": "3",
            "username": "cccccc",
            "avatar":"http://img12.static.yhbimg.com/yhb-img02/2015/06/12/12/02aafe4efc368f307c02b692cf1f862570.jpg?imageView/{mode}/w/{width}/h/{height}",
            "authorDesc":"一个伟大的作家啊",
            "articleCount":"6"
        },
        {
            "id": "4",
            "username": "cccccc",
            "avatar":"http://img12.static.yhbimg.com/yhb-img02/2015/06/12/12/02aafe4efc368f307c02b692cf1f862570.jpg?imageView/{mode}/w/{width}/h/{height}",
            "authorDesc":"推荐",
            "articleCount":"3"
        },
        {
            "id": "5",
            "username": "cccccc",
            "avatar":"http://img12.static.yhbimg.com/yhb-img02/2015/06/12/12/02aafe4efc368f307c02b692cf1f862570.jpg?imageView/{mode}/w/{width}/h/{height}",
            "authorDesc":"一个伟大的作家啊",
            "articleCount":"7"
        }
    ]
}