Browse Source

增加得到推荐题目api

XuShengTao 6 years ago
parent
commit
59f560eb92
1 changed files with 63 additions and 2 deletions
  1. 63 2
      api/REST-推荐.md

+ 63 - 2
api/REST-推荐.md

@@ -4,7 +4,7 @@
 >
 > 示例:**https://xxxxxxxxx/rest/tq/recommend**
 
-##  推荐
+##  得到推荐题目
 
 ```http
 post /rest/tq/recommend
@@ -17,7 +17,7 @@ interface recommendDTO {
   courseId: number;
   userId: number;
   knowledgeId: Array<string>;
-  questionsNum: number;
+  questionNum: number;
 }
 ```
 
@@ -65,3 +65,64 @@ interface ResponseData{
 }
 }
 `````
+
+##  得到题目答案与解析
+
+```http
+post /rest/tq/recommend
+```
+
+### Parameters
+
+```ts
+interface recommendDTO {
+  questionId: Array<number>;
+}
+```
+
+### 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;
+  }]
+}
+```
+
+### Example Response
+
+````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
+}
+}
+`````