|
@@ -164,18 +164,27 @@ public class QuestionController {
|
|
|
return questionService.getInteractiveList(user, questionId);
|
|
return questionService.getInteractiveList(user, questionId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 取得推荐题目
|
|
|
|
|
+ */
|
|
|
@Auth(roles = UserRole.STUDENT, message = "取得推荐题目")
|
|
@Auth(roles = UserRole.STUDENT, message = "取得推荐题目")
|
|
|
@GetMapping("/recommendation")
|
|
@GetMapping("/recommendation")
|
|
|
public List<BaseQuestionVO> getRecommendationQuestions(LoginUser user, @RequestParam(required = false) List<String> knowledgeId, @RequestParam(required = false, defaultValue = "5") Integer questionNum) {
|
|
public List<BaseQuestionVO> getRecommendationQuestions(LoginUser user, @RequestParam(required = false) List<String> knowledgeId, @RequestParam(required = false, defaultValue = "5") Integer questionNum) {
|
|
|
return questionService.getRecommendationQuestions(user, knowledgeId, questionNum);
|
|
return questionService.getRecommendationQuestions(user, knowledgeId, questionNum);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据课程取得推荐题目
|
|
|
|
|
+ */
|
|
|
@Auth(roles = UserRole.STUDENT, message = "根据课程取得推荐题目")
|
|
@Auth(roles = UserRole.STUDENT, message = "根据课程取得推荐题目")
|
|
|
@GetMapping("/course/{courseId}/recommendation")
|
|
@GetMapping("/course/{courseId}/recommendation")
|
|
|
public List<BaseQuestionVO> getRecommendationQuestionsByCourse(LoginUser user, @PathVariable Long courseId, @RequestParam(required = false, defaultValue = "5") Integer questionNum) {
|
|
public List<BaseQuestionVO> getRecommendationQuestionsByCourse(LoginUser user, @PathVariable Long courseId, @RequestParam(required = false, defaultValue = "5") Integer questionNum) {
|
|
|
return questionService.getRecommendationQuestionsByCourse(user, courseId, questionNum);
|
|
return questionService.getRecommendationQuestionsByCourse(user, courseId, questionNum);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 提交做题情况
|
|
|
|
|
+ */
|
|
|
@Auth(roles = UserRole.STUDENT, message = "提交做题情况")
|
|
@Auth(roles = UserRole.STUDENT, message = "提交做题情况")
|
|
|
@PostMapping("/record")
|
|
@PostMapping("/record")
|
|
|
public void submitAnswerRecord(LoginUser user, @Validated @RequestBody StudentAnswerDTO studentAnswerDTO) {
|
|
public void submitAnswerRecord(LoginUser user, @Validated @RequestBody StudentAnswerDTO studentAnswerDTO) {
|