1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-21 01:10:39 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

添加用户收藏书籍、取消收藏书籍、获取书籍收藏状态功能(后端+数据库);更新Api文档

This commit is contained in:
2022-04-05 18:21:49 +08:00
parent 8598edc0f7
commit cf26e925d9
11 changed files with 852 additions and 10 deletions

View File

@@ -170,6 +170,79 @@ __必填__|id|integer (int32)
----
[[_addfavoritesusingpost_1]]
==== 【用户】收藏/取消收藏书籍
....
POST /api/book/getFavoritesStatus
....
===== 说明
用户收藏书籍
===== 参数
[options="header", cols=".^2a,.^3a,.^4a"]
|===
|类型|名称|类型
|**FormData**|**bookId** +
__可选__|integer (int32)
|**FormData**|**token** +
__可选__|string
|===
===== 响应
[options="header", cols=".^2a,.^14a,.^4a"]
|===
|HTTP代码|说明|类型
|**200**|OK|<<_commonreturntype,CommonReturnType>>
|**201**|Created|无内容
|**401**|Unauthorized|无内容
|**403**|Forbidden|无内容
|**404**|Not Found|无内容
|===
===== 消耗
* `application/x-www-form-urlencoded`
===== 生成
* `\*/*`
===== HTTP请求示例
====== 请求 path
----
/api/book/getFavoritesStatus
----
====== 请求 formData
[source,json]
----
"string"
----
===== HTTP响应示例
====== 响应 200
[source,json]
----
{
"data" : "object",
"status" : "string"
}
----
[[_searchusingget]]
==== 查询书籍列表
....
@@ -238,6 +311,81 @@ __可选__|publishingHouse|string
----
[[_addfavoritesusingpost]]
==== 【用户】收藏/取消收藏书籍
....
POST /api/book/toggleFavorites
....
===== 说明
用户收藏书籍
===== 参数
[options="header", cols=".^2a,.^3a,.^4a"]
|===
|类型|名称|类型
|**FormData**|**bookId** +
__可选__|integer (int32)
|**FormData**|**status** +
__可选__|boolean
|**FormData**|**token** +
__可选__|string
|===
===== 响应
[options="header", cols=".^2a,.^14a,.^4a"]
|===
|HTTP代码|说明|类型
|**200**|OK|<<_commonreturntype,CommonReturnType>>
|**201**|Created|无内容
|**401**|Unauthorized|无内容
|**403**|Forbidden|无内容
|**404**|Not Found|无内容
|===
===== 消耗
* `application/x-www-form-urlencoded`
===== 生成
* `\*/*`
===== HTTP请求示例
====== 请求 path
----
/api/book/toggleFavorites
----
====== 请求 formData
[source,json]
----
"string"
----
===== HTTP响应示例
====== 响应 200
[source,json]
----
{
"data" : "object",
"status" : "string"
}
----
[[_82c2171949c312f17a084ab9b31e7d55]]
=== 书籍分类信息
Category Controller
@@ -354,6 +502,79 @@ GET /api/category/list
User Controller
[[_cancelaccountusingpost]]
==== 账号注销
....
POST /api/user/cancelAccount
....
===== 说明
传入用户 token 以及密码明文后台计算密码SHA1值进行注销
===== 参数
[options="header", cols=".^2a,.^3a,.^4a"]
|===
|类型|名称|类型
|**FormData**|**password** +
__可选__|string
|**FormData**|**token** +
__可选__|string
|===
===== 响应
[options="header", cols=".^2a,.^14a,.^4a"]
|===
|HTTP代码|说明|类型
|**200**|OK|<<_commonreturntype,CommonReturnType>>
|**201**|Created|无内容
|**401**|Unauthorized|无内容
|**403**|Forbidden|无内容
|**404**|Not Found|无内容
|===
===== 消耗
* `application/x-www-form-urlencoded`
===== 生成
* `\*/*`
===== HTTP请求示例
====== 请求 path
----
/api/user/cancelAccount
----
====== 请求 formData
[source,json]
----
"string"
----
===== HTTP响应示例
====== 响应 200
[source,json]
----
{
"data" : "object",
"status" : "string"
}
----
[[_getuserstatususingpost]]
==== 获取用户登录状态
....
@@ -719,6 +940,64 @@ __可选__|token|string
----
[[_getbindingstatususingget]]
==== 获取用户已绑定的第三方平台
....
GET /api/third-party/getBindingStatus
....
===== 说明
传入当前登录用户 token ,返回已绑定的第三方平台
===== 参数
[options="header", cols=".^2a,.^3a,.^9a,.^4a"]
|===
|类型|名称|说明|类型
|**Query**|**token** +
__可选__|token|string
|===
===== 响应
[options="header", cols=".^2a,.^14a,.^4a"]
|===
|HTTP代码|说明|类型
|**200**|OK|<<_commonreturntype,CommonReturnType>>
|**401**|Unauthorized|无内容
|**403**|Forbidden|无内容
|**404**|Not Found|无内容
|===
===== 生成
* `\*/*`
===== HTTP请求示例
====== 请求 path
----
/api/third-party/getBindingStatus
----
===== HTTP响应示例
====== 响应 200
[source,json]
----
{
"data" : "object",
"status" : "string"
}
----
[[_loginusingget]]
==== 第三方用户登录跳转地址
....
@@ -777,6 +1056,79 @@ __必填__|platform|string
----
[[_unbindthirdpartaccountusingpost]]
==== 取消第三方平台绑定
....
POST /api/third-party/withdrawThirdPartyBings
....
===== 说明
传入当前登录用户 token 和平台 platform (不区分大小写),返回 bool 值true 为取消绑定成功
===== 参数
[options="header", cols=".^2a,.^3a,.^4a"]
|===
|类型|名称|类型
|**FormData**|**platform** +
__可选__|string
|**FormData**|**token** +
__可选__|string
|===
===== 响应
[options="header", cols=".^2a,.^14a,.^4a"]
|===
|HTTP代码|说明|类型
|**200**|OK|<<_commonreturntype,CommonReturnType>>
|**201**|Created|无内容
|**401**|Unauthorized|无内容
|**403**|Forbidden|无内容
|**404**|Not Found|无内容
|===
===== 消耗
* `application/x-www-form-urlencoded`
===== 生成
* `\*/*`
===== HTTP请求示例
====== 请求 path
----
/api/third-party/withdrawThirdPartyBings
----
====== 请求 formData
[source,json]
----
"string"
----
===== HTTP响应示例
====== 响应 200
[source,json]
----
{
"data" : "object",
"status" : "string"
}
----
[[_aca0f16a4237edba915fe70c9b07871c]]
=== 系统调试接口
Debug Controller