From 888cd055ef107ee896060a8bf8eba65301f8cb6a Mon Sep 17 00:00:00 2001 From: mzh820631607 Date: Fri, 25 Sep 2020 09:27:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EvaluationRecordController.java | 27 ++++++++++++++++++- .../msdw/tms/controller/UserController.java | 2 ++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/msdw/tms/controller/EvaluationRecordController.java b/src/main/java/com/msdw/tms/controller/EvaluationRecordController.java index 343015f..581f58b 100644 --- a/src/main/java/com/msdw/tms/controller/EvaluationRecordController.java +++ b/src/main/java/com/msdw/tms/controller/EvaluationRecordController.java @@ -65,7 +65,32 @@ public class EvaluationRecordController implements EvaluationRecordControllerApi EvaluationRecordVO evaluationRecordVO = evaluationRecordService.convertQuestion(evaluationRecordId, currentQuestionSortNo, userAnswer, currentQuestionSortNo - 1); return R.ok().put("data", evaluationRecordVO); } - +// 备份:上一题/下一题/提交 +// @Override +// @GetMapping("/previous") +// public R previousQuestion(@RequestParam("evaluationRecordId") Integer evaluationRecordId, +// @RequestParam("currentQuestionSortNo") Integer currentQuestionSortNo, +// @RequestParam(value = "userAnswer", required = false) String userAnswer) throws ExecutionException, InterruptedException { +// EvaluationRecordVO evaluationRecordVO = evaluationRecordService.convertQuestion(evaluationRecordId, currentQuestionSortNo, userAnswer, currentQuestionSortNo - 1); +// return R.ok().put("data", evaluationRecordVO); +// } +// @Override +// @GetMapping("/next") +// public R nextQuestion(@RequestParam("evaluationRecordId") Integer evaluationRecordId, +// @RequestParam("currentQuestionSortNo") Integer currentQuestionSortNo, +// @RequestParam(value = "userAnswer", required = false) String userAnswer) throws ExecutionException, InterruptedException { +// EvaluationRecordVO evaluationRecordVO = evaluationRecordService.convertQuestion(evaluationRecordId, currentQuestionSortNo, userAnswer, currentQuestionSortNo + 1); +// return R.ok().put("data", evaluationRecordVO); +// } +// @Override +// @GetMapping("/submit") +// public R submitEvaluation(@RequestParam("evaluationRecordId") Integer evaluationRecordId, +// @RequestParam("currentQuestionSortNo") Integer currentQuestionSortNo, +// @RequestParam(value = "userAnswer", required = false) String userAnswer, +// @RequestParam("userId") Integer userId) throws ExecutionException, InterruptedException { +// EvaluationRecordSubmitVO recordSubmitVO = evaluationRecordService.submitEvaluation(evaluationRecordId, currentQuestionSortNo, userAnswer, userId); +// return R.ok().put("data", recordSubmitVO); +// } @Override @GetMapping("/next") public R nextQuestion(@RequestParam("evaluationRecordId") Integer evaluationRecordId, diff --git a/src/main/java/com/msdw/tms/controller/UserController.java b/src/main/java/com/msdw/tms/controller/UserController.java index 84093be..aff7cc1 100644 --- a/src/main/java/com/msdw/tms/controller/UserController.java +++ b/src/main/java/com/msdw/tms/controller/UserController.java @@ -40,6 +40,7 @@ public class UserController implements UserControllerApi { return R.ok().put("growthChangeHistory", userEntity); } + @Override @GetMapping("/userinfo/{id}") public R userInfo(@PathVariable("id") Integer id){ UserEntityVo userEntityVo = userService.queryUserId(id); @@ -59,6 +60,7 @@ public class UserController implements UserControllerApi { /** * 修改 */ + @Override @PutMapping("/update") public R update(@RequestBody UserEntity userEntity){ userService.updateById(userEntity);