diff --git "a/dramaeditor/\345\257\274\345\205\245txt\346\226\207\344\273\266\345\222\214\347\233\221\345\220\254\347\231\276\345\210\206\346\257\224.md" "b/dramaeditor/\345\257\274\345\205\245txt\346\226\207\344\273\266\345\222\214\347\233\221\345\220\254\347\231\276\345\210\206\346\257\224.md" new file mode 100644 index 0000000..800fcc9 --- /dev/null +++ "b/dramaeditor/\345\257\274\345\205\245txt\346\226\207\344\273\266\345\222\214\347\233\221\345\220\254\347\231\276\345\210\206\346\257\224.md" @@ -0,0 +1,82 @@ + + +## 1.1上传TXT文件 + +### 请求参数 + + 1. 请求方式 + Request Method: post + Path: /work/importTxt + 2. 请求头:无 + 3. 请求参数 + +| 参数名 | 参数类型 | 描述 | 必须 | +| ------------- | -------- | ------------------------ | ---- | +| multipartFile | .TXT文件 | 文件 | Y | +| id | Long | 作品id | Y | +| flags | Boolean | 累加还是覆盖,true为覆盖 | Y | + + 4. 请求体示例 + +``` +curl --location --request post 'http://localhost:48089/work/importTxt?id=1' +上传的文件 +``` + +## 响应参数 + + - 响应参数示例 + +```json +{ + "code":"1", + "msg":"成功", + "data":null +} +``` + +## 1.2 TXT文本进度百分比 + +### 请求参数 + + 1. 请求方式 + Request Method: GET + Path: /work/getPercent + 2. 请求头:无 + 3. 请求参数 + +| 参数名 | 参数类型 | 描述 | 必须 | +| --------- | -------- | ------ | ---- | +| projectId | Long | 作品id | Y | + + 4. 请求体示例 + +``` +curl --location --request post 'http://localhost:48089/work/getPercent?id=1' +上传的文件 +``` + +## 响应参数 + + - 响应参数示例 + +```json +SUCCESS: +{ + "code": 1, + "data": { + "progress": 100, + "status": 1 + }, + "msg": "成功" +} + + +FAILTURE: +{ + "code": 13001, + "msg": "剧情编号不合法,参考如下:”1-1”;”1-2”;”1-1-1“" +} +``` + +#