|
@@ -1,16 +1,16 @@
|
|
|
-# rest - 推荐
|
|
|
|
|
|
|
+# QUESTION - 题库
|
|
|
|
|
|
|
|
-> url 前缀:**rest/tq**
|
|
|
|
|
|
|
+> url 前缀:**question**
|
|
|
>
|
|
>
|
|
|
-> 示例:**https://xxxxxxxxx/rest/tq/recommend**
|
|
|
|
|
|
|
+> 示例:**https://xxxxxxxxx/api/question**
|
|
|
|
|
|
|
|
-## 得到推荐题目
|
|
|
|
|
|
|
+## 得到推荐题目
|
|
|
|
|
|
|
|
```http
|
|
```http
|
|
|
-post /rest/tq/recommend
|
|
|
|
|
|
|
+post /recommend
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-### Parameters
|
|
|
|
|
|
|
+### Parameters
|
|
|
|
|
|
|
|
```ts
|
|
```ts
|
|
|
interface recommendDTO {
|
|
interface recommendDTO {
|
|
@@ -21,58 +21,54 @@ interface recommendDTO {
|
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-### Response
|
|
|
|
|
-
|
|
|
|
|
-`````ts
|
|
|
|
|
-interface ResponseData{
|
|
|
|
|
- res:[{
|
|
|
|
|
- id: number;
|
|
|
|
|
- type: string;
|
|
|
|
|
- stem: string;
|
|
|
|
|
- options: {
|
|
|
|
|
- [key: string]: string;
|
|
|
|
|
- };
|
|
|
|
|
- tags: string[];
|
|
|
|
|
- knowledgeId: string[];
|
|
|
|
|
- lastModified: Date;
|
|
|
|
|
- }]
|
|
|
|
|
|
|
+### Response
|
|
|
|
|
+
|
|
|
|
|
+```ts
|
|
|
|
|
+interface ResponseData {
|
|
|
|
|
+ res: [
|
|
|
|
|
+ {
|
|
|
|
|
+ id: number;
|
|
|
|
|
+ type: string;
|
|
|
|
|
+ stem: string;
|
|
|
|
|
+ options: {
|
|
|
|
|
+ [key: string]: string;
|
|
|
|
|
+ };
|
|
|
|
|
+ tags: string[];
|
|
|
|
|
+ knowledgeId: string[];
|
|
|
|
|
+ lastModified: Date;
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
### Example Response
|
|
### Example Response
|
|
|
|
|
|
|
|
-````json
|
|
|
|
|
|
|
+```json
|
|
|
{
|
|
{
|
|
|
-"res":{
|
|
|
|
|
-"id": 11,
|
|
|
|
|
-"type": "choice",
|
|
|
|
|
-"stem": "这是一次测试",
|
|
|
|
|
-"options":{
|
|
|
|
|
-"A": "2k-l > n + k",
|
|
|
|
|
-"B": "2n-l <= n + k",
|
|
|
|
|
-"C": "n = k",
|
|
|
|
|
-"D": "n-l <= k"
|
|
|
|
|
-},
|
|
|
|
|
-"tags":[
|
|
|
|
|
-"test",
|
|
|
|
|
-"ok"
|
|
|
|
|
-],"knowledgeId":[
|
|
|
|
|
-"A.B",
|
|
|
|
|
-"C.D"
|
|
|
|
|
-],
|
|
|
|
|
-"lastModified": "2019-12-30 18:12:13",
|
|
|
|
|
-"tq_id": 11
|
|
|
|
|
|
|
+ "res": {
|
|
|
|
|
+ "id": 11,
|
|
|
|
|
+ "type": "choice",
|
|
|
|
|
+ "stem": "这是一次测试",
|
|
|
|
|
+ "options": {
|
|
|
|
|
+ "A": "2k-l > n + k",
|
|
|
|
|
+ "B": "2n-l <= n + k",
|
|
|
|
|
+ "C": "n = k",
|
|
|
|
|
+ "D": "n-l <= k"
|
|
|
|
|
+ },
|
|
|
|
|
+ "tags": ["test", "ok"],
|
|
|
|
|
+ "knowledgeId": ["A.B", "C.D"],
|
|
|
|
|
+ "lastModified": "2019-12-30 18:12:13"
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
-`````
|
|
|
|
|
|
|
+```
|
|
|
|
|
|
|
|
-## 得到题目答案与解析
|
|
|
|
|
|
|
+## 得到题目答案与解析
|
|
|
|
|
|
|
|
```http
|
|
```http
|
|
|
-post /rest/tq/recommend
|
|
|
|
|
|
|
+post /answer
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-### Parameters
|
|
|
|
|
|
|
+### Parameters
|
|
|
|
|
|
|
|
```ts
|
|
```ts
|
|
|
interface recommendDTO {
|
|
interface recommendDTO {
|
|
@@ -80,49 +76,46 @@ interface recommendDTO {
|
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-### Response
|
|
|
|
|
-
|
|
|
|
|
-`````ts
|
|
|
|
|
-interface ResponseData{
|
|
|
|
|
- res:[{
|
|
|
|
|
- id: number;
|
|
|
|
|
- type: string;
|
|
|
|
|
- stem: string;
|
|
|
|
|
- options: {
|
|
|
|
|
- [key: string]: string;
|
|
|
|
|
- };
|
|
|
|
|
- tags: string[];
|
|
|
|
|
- knowledgeId: string[];
|
|
|
|
|
- lastModified: Date;
|
|
|
|
|
- answer: string;
|
|
|
|
|
- analysis: string;
|
|
|
|
|
- }]
|
|
|
|
|
|
|
+### Response
|
|
|
|
|
+
|
|
|
|
|
+```ts
|
|
|
|
|
+interface ResponseData {
|
|
|
|
|
+ res: Array<{
|
|
|
|
|
+ id: number;
|
|
|
|
|
+ type: string;
|
|
|
|
|
+ stem: string;
|
|
|
|
|
+ options: {
|
|
|
|
|
+ [key: string]: string;
|
|
|
|
|
+ };
|
|
|
|
|
+ tags: string[];
|
|
|
|
|
+ knowledgeId: string[];
|
|
|
|
|
+ lastModified: Date;
|
|
|
|
|
+ answer: string;
|
|
|
|
|
+ analysis: string;
|
|
|
|
|
+ }>;
|
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
### Example Response
|
|
### Example Response
|
|
|
|
|
|
|
|
-````json
|
|
|
|
|
|
|
+```json
|
|
|
{
|
|
{
|
|
|
-"res":{
|
|
|
|
|
-"id": 11,
|
|
|
|
|
-"type": "choice",
|
|
|
|
|
-"stem": "这是一次测试",
|
|
|
|
|
-"options":{
|
|
|
|
|
-"A": "2k-l > n + k",
|
|
|
|
|
-"B": "2n-l <= n + k",
|
|
|
|
|
-"C": "n = k",
|
|
|
|
|
-"D": "n-l <= k"
|
|
|
|
|
-},
|
|
|
|
|
-"tags":[
|
|
|
|
|
-"test",
|
|
|
|
|
-"ok"
|
|
|
|
|
-],"knowledgeId":[
|
|
|
|
|
-"A.B",
|
|
|
|
|
-"C.D"
|
|
|
|
|
-],
|
|
|
|
|
-"lastModified": "2019-12-30 18:12:13",
|
|
|
|
|
-"tq_id": 11
|
|
|
|
|
|
|
+ "res": [
|
|
|
|
|
+ {
|
|
|
|
|
+ "id": 11,
|
|
|
|
|
+ "type": "choice",
|
|
|
|
|
+ "stem": "这是一次测试",
|
|
|
|
|
+ "options": {
|
|
|
|
|
+ "A": "2k-l > n + k",
|
|
|
|
|
+ "B": "2n-l <= n + k",
|
|
|
|
|
+ "C": "n = k",
|
|
|
|
|
+ "D": "n-l <= k"
|
|
|
|
|
+ },
|
|
|
|
|
+ "tags": ["test", "ok"],
|
|
|
|
|
+ "knowledgeId": ["A.B", "C.D"],
|
|
|
|
|
+ "lastModified": "2019-12-30 18:12:13",
|
|
|
|
|
+ "tq_id": 11
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
-`````
|
|
|
|
|
|
|
+```
|