作者: yeguozhong yedaxia.github.com
请求URL
/api/book/list
GET
请求参数 application/x-www-form-urlencoded
参数名 | 类型 | 必须 | 描述 |
---|---|---|---|
page | int | 否 | 页数 |
limit | int | 否 | 每页条数 |
sort | string | 否 | 排序 |
返回结果
{ "body":{ "total":"int //总记录数", "pageCount":"int //页数", "currentPage":"int //当前页", "pageSize":"int //每页记录数", "list":[{ "bookId":"long //图书id", "bookName":"string //图书名称", "price":{ "price":"double //价格", "country":"int //国家" } }], "hasMore":"boolean //是否还有更多" }, "code":"int", "errMsg":"string", "data":{ "total":"int //总记录数", "pageCount":"int //页数", "currentPage":"int //当前页", "pageSize":"int //每页记录数", "list":[{ "bookId":"long //图书id", "bookName":"string //图书名称", "price":{ "price":"double //价格", "country":"int //国家" } }], "hasMore":"boolean //是否还有更多" }, "errType":"enum // [SUCCESS,WARN,ERROR]" }
作者: yeguozhong yedaxia.github.com
请求URL
/api/book/book-detail
GET
请求参数 application/x-www-form-urlencoded
参数名 | 类型 | 必须 | 描述 |
---|---|---|---|
id | long | 是 | 图书ID |
返回结果
{ "body":{ "bookId":"long //图书id", "bookName":"string //图书名称", "price":{ "price":"double //价格", "country":"int //国家" }, "storeCount":"int //馆藏数量", "pictures":"string[] //图片", "owner":{ "userId":"string //用户id", "userName":"string //用户名", "friend":"SimpleUser{}", "friends":[{ "userId":"string //用户id", "userName":"string //用户名", "friend":"SimpleUser{}" }], "readBooks":[{ "bookId":"long //图书id", "bookName":"string //图书名称", "price":{ "price":"double //价格", "country":"int //国家" } }], "isFollow":"boolean //是否关注", "follower":"UserVO[]" } }, "code":"int", "errMsg":"string", "data":{ "bookId":"long //图书id", "bookName":"string //图书名称", "price":{ "price":"double //价格", "country":"int //国家" }, "storeCount":"int //馆藏数量", "pictures":"string[] //图片", "owner":{ "userId":"string //用户id", "userName":"string //用户名", "friend":"SimpleUser{}", "friends":[{ "userId":"string //用户id", "userName":"string //用户名", "friend":"SimpleUser{}" }], "readBooks":[{ "bookId":"long //图书id", "bookName":"string //图书名称", "price":{ "price":"double //价格", "country":"int //国家" } }], "isFollow":"boolean //是否关注", "follower":"UserVO[]" } }, "errType":"enum // [SUCCESS,WARN,ERROR]" }
作者: yeguozhong yedaxia.github.com
请求URL
/api/book/del-book
GET
请求参数 application/x-www-form-urlencoded
参数名 | 类型 | 必须 | 描述 |
---|---|---|---|
bookId | long | 是 | 图书ID |
返回结果
{ "body":{ "bookId":"long //图书id", "bookName":"string //图书名称", "price":{ "price":"double //价格", "country":"int //国家" } }, "code":"int", "errMsg":"string", "data":{ "bookId":"long //图书id", "bookName":"string //图书名称", "price":{ "price":"double //价格", "country":"int //国家" } }, "errType":"enum // [SUCCESS,WARN,ERROR]" }
作者: yeguozhong yedaxia.github.com
请求URL
/api/book/del-books
DELETE
请求参数 application/x-www-form-urlencoded
参数名 | 类型 | 必须 | 描述 |
---|---|---|---|
bookIds | long[] | 否 |
返回结果
{ "body":{}, "code":"int", "errMsg":"string", "data":{}, "errType":"enum // [SUCCESS,WARN,ERROR]" }
作者: yeguozhong yedaxia.github.com
请求URL
/api/book/buy-book
POST
请求参数 application/x-www-form-urlencoded
参数名 | 类型 | 必须 | 描述 |
---|---|---|---|
bookId | long | 否 |
返回结果
{ "headers":{ "headers":{} }, "body":{ "bookId":"long", "bookName":"string", "price":{ "price":"double", "country":"int" } } }