From 6ad61043f5bf0f30eb0dc03604d764c5cd7b5acd Mon Sep 17 00:00:00 2001
From: leijie <547224643@qq.com>
Date: Wed, 25 Aug 2021 14:06:20 +0800
Subject: [PATCH] 剧本编辑
---
dramaeditor/剧情编辑前后端接口文档.md | 372 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------
1 file changed, 338 insertions(+), 34 deletions(-)
diff --git "a/dramaeditor/\345\211\247\346\203\205\347\274\226\350\276\221\345\211\215\345\220\216\347\253\257\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/dramaeditor/\345\211\247\346\203\205\347\274\226\350\276\221\345\211\215\345\220\216\347\253\257\346\216\245\345\217\243\346\226\207\346\241\243.md"
index 1e8216e..3753ee0 100644
--- "a/dramaeditor/\345\211\247\346\203\205\347\274\226\350\276\221\345\211\215\345\220\216\347\253\257\346\216\245\345\217\243\346\226\207\346\241\243.md"
+++ "b/dramaeditor/\345\211\247\346\203\205\347\274\226\350\276\221\345\211\215\345\220\216\347\253\257\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -8,8 +8,16 @@
-
## 公共请求头 :Authorization:token(登录后返回)
+
+ # 1.测试环境部署地址
+
+## 1.1后端部署
+
+- 服务器:gz26
+- 服务器部署地址:/home/jiaoyou/projects_dev/plotEditor
+- 前端部署地址:/var/www/html/dramaeditor
+
# 一、登录注册
## 1.1登录
### 请求参数
@@ -18,7 +26,7 @@
Path: /ploteditor/login
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
ueserName | String | 用户名 | Y
@@ -32,7 +40,7 @@ passWord | String | 用户密码 | Y
```
### 响应参数
- 响应参数data说明
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
duration | Long | token有效时间 | Y
@@ -59,7 +67,7 @@ authority | String | 用户权限等级 | Y
Path: /ploteditor/email
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
email | String | 邮箱 | Y
@@ -88,7 +96,7 @@ forgotPassword | Boolean | 发送验证码作用(true:忘记密码/false:注
Path: /ploteditor/registered
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
ueserName | String | 用户名 | Y
@@ -120,7 +128,7 @@ code | String | 验证码 | Y
Path: /ploteditor/forgot
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
ueserName | String | 用户名 | Y
@@ -153,7 +161,7 @@ code | String | 验证码 | Y
Path: /work/insert
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
name | String | 新增作品名称 | Y
@@ -188,7 +196,7 @@ gmtModified | data | 用户修改时间 | Y
Path: /work/update
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 作品编号 | Y
@@ -219,7 +227,7 @@ count | int | 作品字数 | Y
Path: /work/inquiry
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
name | String |作品名 | Y
@@ -229,7 +237,7 @@ curl --location --request GET 'http://localhost:48089/work/inquiry?name=%E7%AC%A
```
## 响应参数
- 响应参数data说明
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 作品id | Y
@@ -261,7 +269,7 @@ gmtModified | data | 用户修改时间 | Y
Path: /work/delete
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | int | 作品id | Y
@@ -286,7 +294,7 @@ curl --location --request DELETE 'http://localhost:48089/work/delete?id=8'
Path: /plotpoint/insertAll
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | int | 作品id | Y
@@ -296,7 +304,7 @@ curl --location --request GET 'http://localhost:48089/plotpoint/insertAll?Id=1'
```
## 响应参数
- 响应参数data说明
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 剧情点id | Y
@@ -349,7 +357,7 @@ branchCount | int | 剧情点分支数量 | Y
Path: /work/inquiryAll
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
4. 请求体示例
@@ -358,7 +366,7 @@ curl --location --request GET 'http://localhost:48089/work/inquiryAll'
```
## 响应参数
- 响应参数data说明
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | int | 作品id | Y
@@ -393,7 +401,7 @@ count | int | 作品字数 | Y
Path: /work/getJson
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | int | 作品id | Y
@@ -403,7 +411,7 @@ curl --location --request GET 'http://localhost:48089/work/getJson?id=1'
```
## 响应参数
- 响应参数data说明
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
filePath | String | 文件下载路径 | Y
@@ -424,7 +432,7 @@ filePath | String | 文件下载路径 | Y
Path: /work/setJson
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
multipartFile | .json文件 | 文件 | Y
@@ -451,7 +459,7 @@ curl --location --request post 'http://localhost:48089/work/setJson?id=1'
Path: /comment/insert
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 评论id(不传说明是用户评论,而不是回答别人的评论) | Y
@@ -475,14 +483,14 @@ plotId | Long | 剧情点id,取得是剧情点列表或详情返回的plot_id
}
```
-## 2.2搜索剧情点
+## 2.2查询评论
### 请求参数
1. 请求方式
Request Method: GET
Path: /comment/inquiry
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
plotId | Long | 剧情点id,取得是剧情点列表或详情返回的plot_id | Y
@@ -492,7 +500,7 @@ curl --location --request GET 'http://localhost:48089/comment/inquiry?plotId=1'
```
## 响应参数
- 响应参数data说明
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 评论id | Y
@@ -537,14 +545,14 @@ gmtCreate | String | 评论时间 | Y
}
```
-## 2.3删除剧情点
+## 2.3删除评论
### 请求参数
1. 请求方式
Request Method: DELETE
Path: /comment/delete
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 评论id | Y
@@ -561,7 +569,7 @@ curl --location --request DELETE 'http://localhost:48089/comment/delete?Id=7'
"data":null
}
```
-# 三、剧情点页面
+# 四、剧情点页面
## 2.1新增剧情点
### 请求参数
1. 请求方式
@@ -569,7 +577,7 @@ curl --location --request DELETE 'http://localhost:48089/comment/delete?Id=7'
Path: /plotpoint/insert
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
branchs | List | 该剧情点分支 | Y
@@ -626,7 +634,7 @@ uncondition | Boolean | true:开启任意跳转/false:关闭任意跳转 |
Path: /plotpoint/inquiry
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
plotText | String | 剧情点编号 | Y
@@ -637,7 +645,7 @@ curl --location --request GET 'http://localhost:48089/plotpoint/inquiry?plotText
```
## 响应参数
- 响应参数data说明
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 剧情点id | Y
@@ -690,7 +698,7 @@ branchCount | int | 剧情点分支数量 | Y
Path: /plotpoint/delete
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 剧情点id | Y
@@ -716,7 +724,7 @@ curl --location --request DELETE 'http://localhost:48089/plotpoint/delete?Id=7&p
Path: /plotpoint/detail
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | Long | 剧情点id | Y
@@ -726,7 +734,7 @@ curl --location --request GET 'http://localhost:48089/plotpoint/detail?number=1-
```
## 响应参数
- 响应参数data说明
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
nextPlotNum | String | 分支编号 | Y
@@ -747,6 +755,7 @@ complete | Boolean | true:剧情点已完善/false:未完善 | Y
wordCount | int | 剧情点字数 | Y
branchCount | int | 剧情点分支数量 | Y
reply | String | 上一步剧情分支内容 | Y
+commentId | Long | 剧情点复制id | Y
- 响应参数示例
```json
{
@@ -789,7 +798,8 @@ reply | String | 上一步剧情分支内容 | Y
"uncondition": true,
"complete": false,
"wordCount": 15,
- "branchCount": 2
+ "branchCount": 2,
+ "commentId": 2
}
}
```
@@ -801,7 +811,7 @@ reply | String | 上一步剧情分支内容 | Y
Path: /plotpoint/updata
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | int | 剧情点id | Y
@@ -862,7 +872,7 @@ uncondition | Boolean | true:开启任意跳转/false:关闭任意跳转 |
Path: /plotpoint/detect
2. 请求头:无
3. 请求参数
-
+
参数名 | 参数类型 | 描述 | 必须
-------- | ----- | ----- | -----
id | int | 作品id | Y
@@ -881,3 +891,297 @@ id | int | 作品id | Y
"data":null
}
```
+
+## 2.7根据作品id查询所有角色
+
+### 请求参数
+
+ 1. 请求方式
+ Request Method: GET
+ Path: /plotpoint/getAllRoles
+
+ 2. 请求头:无
+
+ 3. 请求参数
+
+ | 参数名 | 参数类型 | 描述 | 必须 |
+ | --------- | -------- | ------------ | ---- |
+ | projectId | Long | 作品id | Y |
+ | pageNum | Integer | 页码 | F |
+ | pageSize | Integer | 显示多少条数 | F |
+
+4.请求体示例
+
+```
+localhost:48089/plotpoint/getAllRoles?projectId=149
+```
+
+## 响应参数
+
+- 响应参数data说明
+
+ | 参数名 | 参数类型 | 描述 | 必须 |
+ | ---------- | --------- | -------------------- | ---- |
+ | id | Long | 角色ID | F |
+ | workId | Long | 作品id | Y |
+ | roleName | String | 角色名称 | Y |
+ | speakStyle | String | 说话风格,播报的风格 | Y |
+ | intonation | int | 音调 | Y |
+ | speech | int | 语速 | Y |
+ | volume | int | 音量 | Y |
+ | updateTime | Timestamp | 更新时间 | F |
+
+- 响应参数示例
+
+ ```
+ {
+ "code": 1,
+ "msg": "成功",
+ "data": {
+ "records": [
+ {
+ "id": 33,
+ "workId": 149,
+ "roleName": "旁白",
+ "speakStyle": "滕志梅(客服女声)",
+ "intonation": 50,
+ "speech": 0,
+ "volume": 50,
+ "updateTime": "2021-08-17T07:41:05.000+00:00"
+ },
+ {
+ "id": 34,
+ "workId": 149,
+ "roleName": "分支1",
+ "speakStyle": "滕志梅(客服女声)",
+ "intonation": 50,
+ "speech": 0,
+ "volume": 50,
+ "updateTime": "2021-08-17T07:41:05.000+00:00"
+ },
+ {
+ "id": 35,
+ "workId": 149,
+ "roleName": "分支2",
+ "speakStyle": "滕志梅(客服女声)",
+ "intonation": 50,
+ "speech": 0,
+ "volume": 50,
+ "updateTime": "2021-08-17T07:41:05.000+00:00"
+ }
+ ],
+ "total": 3,
+ "size": 5,
+ "current": 1,
+ "orders": [],
+ "hitCount": false,
+ "searchCount": true,
+ "pages": 1
+ }
+ }
+ ```
+
+
+
+## 2.8修改角色信息
+
+### 请求参数
+
+请求方式
+Request Method: PUT
+Path: /plotpoint/updateByStyle
+
+请求头:无
+
+请求参数
+
+| 参数名 | 参数类型 | 描述 | 必须 |
+| ---------- | -------- | -------- | ---- |
+| workId | Long | 作品id | Y |
+| speakStyle | String | 说话风格 | Y |
+| intonation | int | 音调 | Y |
+| speech | int | 语速 | Y |
+| volume | int | 音量 | Y |
+| roleName | String | 角色名称 | Y |
+
+4.请求体示例
+
+```
+localhost:48089/plotpoint/updateByStyle?workId=89&speakStyle=滕志梅(11111服女声)&intonation=10&speech=90&volume=10&roleName=分支7
+```
+
+- 响应参数示例
+
+ ```
+ {
+ "code": 1,
+ "msg": "更新成功!",
+ "data": null
+ }
+ ```
+
+
+## 2.8搜索意图
+
+1. 请求方式
+ Request Method: POST
+ Path: /plotpoint/intention
+
+2. 请求参数
+
+ | 参数名 | 参数类型 | 描述 | 必须 |
+ | ------ | -------- | ---------- | ----------- |
+ | sents | String | 意图搜索名 | Y请求体示例 |
+
+3. 请求体示例
+
+ ```
+ {
+ "sents":"愿意陪伴,没兴趣陪伴你,看看我"
+ }
+ ```
+
+4.响应参数示例
+
+```
+{
+ "code": 1,
+ "msg": "成功",
+ "data": {
+ "同意陪": [
+ "先陪\n就陪伴",
+ "陪打球\n陪伴游泳",
+ "同意陪\n答应陪伴",
+ "愿意陪伴\n想陪",
+ "陪伴我\n陪我",
+ "陪吧\n陪伴",
+ "陪他们\n陪她",
+ "当然陪\n一定陪伴",
+ "陪伴你\n陪你"
+ ],
+ "不同意陪": [
+ "不陪伴你\n不陪你",
+ "不陪伴我\n不陪我",
+ "拒绝陪吗\n拒绝陪伴吗",
+ "我不陪\n我不陪伴",
+ "拒绝陪\n拒绝陪伴",
+ "讨厌陪\n讨厌陪伴",
+ "不愿意陪伴\n不想陪",
+ "没兴趣陪伴你\n没兴趣陪你",
+ "真丢人,要人陪",
+ "不陪\n不陪伴",
+ "不陪他们\n不陪她",
+ "不同意陪\n不答应陪伴"
+ ],
+ "不同意看": [
+ "拒绝看\n拒绝看见",
+ "不看他们\n别看她",
+ "拒绝看吗\n拒绝看见吗",
+ "我不看看\n我没看见",
+ "不看\n没看见",
+ "不看吗",
+ "不愿意看\n不想看",
+ "不去看看\n不过去看",
+ "不同意看\n不答应看",
+ "讨厌看\n讨厌看见",
+ "看什么看",
+ "没看我\n不看看我",
+ "没看你\n不看看你"
+ ],
+ "同意看": [
+ "看他们\n看她",
+ "我看看\n我瞧瞧",
+ "去看看\n过去看",
+ "看我\n看看我",
+ "同意看\n答应看",
+ "看你\n看看你",
+ "看吧\n看看",
+ "看吗\n看看吗",
+ "愿意看\n想看",
+ "看一下\n就看看"
+ ]
+ }
+}
+```
+
+
+
+## 2.9查看意图信息
+
+1. 请求方式
+ Request Method: GET
+ Path: /plotpoint/selectBranch
+
+2. 请求参数
+
+ | 参数名 | 参数类型 | 描述 | 必须 |
+ | --------- | -------- | ---- | ---- |
+ | intention | String | 意图 | Y |
+
+3.请求体示例
+
+```
+localhost:48089/plotpoint/selectBranch?intention=同意陪
+```
+
+4.响应参数
+
+| 参数名 | 参数类型 | 描述 | 必须 |
+| --------------- | --------------- | ------------------------------- | ---- |
+| examples | list | map的key,value为string的集合 | Y |
+| accompanyPhrase | list | map的key,value为PhrasesBo的集合 | Y |
+| agree | list | map的key,value为PhrasesBo的集合 | Y |
+| agreeWish | list | map的key,value为PhrasesBo的集合 | Y |
+
+5.响应参数示例
+
+```
+{
+ "code": 1,
+ "msg": "成功",
+ "data": {
+ "examples": [
+ "先陪\n就陪伴",
+ "陪打球\n陪伴游泳",
+ "同意陪\n答应陪伴",
+ "愿意陪伴\n想陪",
+ "陪伴我\n陪我",
+ "陪吧\n陪伴",
+ "陪他们\n陪她",
+ "当然陪\n一定陪伴",
+ "陪伴你\n陪你"
+ ],
+ "accompanyPhrase": [
+ {
+ "phraseName": "项目词组陪伴动词",
+ "pos": null,
+ "words": "陪+陪陪+陪伴+陪同+伴随+随同",
+ "highPerformance": false,
+ "wordSet": [],
+ "ableEdit": false
+ }
+ ],
+ "agree": [
+ {
+ "phraseName": "项目词组同意动词",
+ "pos": null,
+ "words": "+同意+赞成+答应+应承+答允+承诺+愿意+允许+赞助+制定+附和+和议+协议+准许+订定+订交+应许+乐意+容许+许诺+允诺+应承+批准+赞成+许可+赞同+答应+应允+保证+支持+许可+准许+愿意+期待+愿+应允+希望+愿望+认同+认可+接受",
+ "highPerformance": false,
+ "wordSet": [],
+ "ableEdit": false
+ }
+ ],
+ "agreeWish": [
+ {
+ "phraseName": "项目词组同意意愿动词",
+ "pos": null,
+ "words": "要+想+需要+应该+想要+选+选择+会+可以+打算+准备+计划+愿意+乐意+希望+考虑+愿",
+ "highPerformance": false,
+ "wordSet": [],
+ "ableEdit": false
+ }
+ ]
+ }
+}
+```
+
--
libgit2 0.27.1