Commit 2da78204 by 黄淦达

评论

parent 1bf50154
......@@ -124,7 +124,7 @@ code | String | 验证码 | Y
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
ueserName | String | 用户名 | Y
passWord | String | 用户密码 | Y
passWord | String | 用户设置的新密码 | Y
email | String | 邮箱 | Y
code | String | 验证码 | Y
4. 请求体示例
......@@ -443,6 +443,124 @@ curl --location --request post 'http://localhost:48089/work/setJson?id=1'
"data":null
}
```
# 三、评论页面
## 2.1新增评论
### 请求参数
1. 请求方式
Request Method: POST
Path: /comment/insert
2. 请求头:无
3. 请求参数
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 评论id(不传说明是用户评论,而不是回答别人的评论) | Y
Content | String | 评论内容 | Y
plotId | Long | 剧情点id,取得是剧情点列表或详情返回的plot_id | Y
4. 请求体示例
```json
{
"id":1,
"Content": "好啊",
"plotId": 126
}
```
## 响应参数
- 响应参数示例
```json
{
"code":"1",
"msg":"成功",
"data":null
}
```
## 2.2搜索剧情点
### 请求参数
1. 请求方式
Request Method: GET
Path: /comment/inquiry
2. 请求头:无
3. 请求参数
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
plotId | Long | 剧情点id,取得是剧情点列表或详情返回的plot_id | Y
4. 请求体示例
```
curl --location --request GET 'http://localhost:48089/comment/inquiry?plotId=1'
```
## 响应参数
- 响应参数data说明
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 评论id | Y
commentator | String | 评论人 | Y
respondent | String | 被评论人 | Y
content | String | 评论内容 | Y
parentId | Long | 所属评论id | Y
plotId | Long | 剧情点id | Y
userDelete | Boolean | 用户是否可以删除(true:可以删除/false:不可以) | Y
subComments | List | 评论下的对话 | Y
gmtCreate | String | 评论时间 | Y
- 响应参数示例
```json
{
"code": 1,
"msg": "成功",
"data": [
{
"id": 1,
"commentator": "hgd",
"respondent": null,
"parentId": 0,
"plotId": 126,
"userDelete": true,
"subComments": [
{
"id": 1,
"commentator": "hgd",
"respondent": null,
"parentId": 0,
"plotId": 126,
"userDelete": true,
"subComments": null,
"gmtCreate": null,
"content": "好啊"
}
],
"gmtCreate": null,
"content": "好啊"
}
]
}
```
## 2.3删除剧情点
### 请求参数
1. 请求方式
Request Method: DELETE
Path: /comment/delete
2. 请求头:无
3. 请求参数
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 评论id | Y
4. 请求体示例
```json
curl --location --request DELETE 'http://localhost:48089/comment/delete?Id=7'
```
## 响应参数
- 响应参数示例
```json
{
"code":"1",
"msg":"成功",
"data":null
}
```
# 三、剧情点页面
## 2.1新增剧情点
### 请求参数
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment