diff --git a/src/main/java/com/msdw/tms/api/QuestionsControllerApi.java b/src/main/java/com/msdw/tms/api/QuestionsControllerApi.java index bc234ab..3086fcd 100644 --- a/src/main/java/com/msdw/tms/api/QuestionsControllerApi.java +++ b/src/main/java/com/msdw/tms/api/QuestionsControllerApi.java @@ -11,6 +11,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.List; /** @@ -51,7 +52,9 @@ public interface QuestionsControllerApi { * 是否禁用试题 */ @ApiOperation(value = "是否禁用试题", notes = "是否禁用试题") - R isNable(@ApiParam(name = "id", value = "试题主键", required = true) Integer id); + R isNable(@ApiParam(name = "id", value = "试题主键", required = true) List idList); +// 2020.09.18 +// R isNable(@ApiParam(name = "id", value = "试题主键", required = true) Integer id); /** * 删除 diff --git a/src/main/java/com/msdw/tms/controller/EvaluationRecordController.java b/src/main/java/com/msdw/tms/controller/EvaluationRecordController.java index 2335175..343015f 100644 --- a/src/main/java/com/msdw/tms/controller/EvaluationRecordController.java +++ b/src/main/java/com/msdw/tms/controller/EvaluationRecordController.java @@ -58,7 +58,7 @@ public class EvaluationRecordController implements EvaluationRecordControllerApi } @Override - @PostMapping("/previous") + @GetMapping("/previous") public R previousQuestion(@RequestParam("evaluationRecordId") Integer evaluationRecordId, @RequestParam("currentQuestionSortNo") Integer currentQuestionSortNo, @RequestParam(value = "userAnswer", required = false) String userAnswer) throws ExecutionException, InterruptedException { @@ -67,7 +67,7 @@ public class EvaluationRecordController implements EvaluationRecordControllerApi } @Override - @PostMapping("/next") + @GetMapping("/next") public R nextQuestion(@RequestParam("evaluationRecordId") Integer evaluationRecordId, @RequestParam("currentQuestionSortNo") Integer currentQuestionSortNo, @RequestParam(value = "userAnswer", required = false) String userAnswer) throws ExecutionException, InterruptedException { @@ -83,7 +83,7 @@ public class EvaluationRecordController implements EvaluationRecordControllerApi } @Override - @PostMapping("/submit") + @GetMapping("/submit") public R submitEvaluation(@RequestParam("evaluationRecordId") Integer evaluationRecordId, @RequestParam("currentQuestionSortNo") Integer currentQuestionSortNo, @RequestParam(value = "userAnswer", required = false) String userAnswer, @@ -99,6 +99,11 @@ public class EvaluationRecordController implements EvaluationRecordControllerApi return R.ok().put("data", detailVO); } + /** + * 查询是否能够开启实验 + * @param userId + * @return + */ @Override @GetMapping("/can_experiment") public R isOpenExperiment(Integer userId) { diff --git a/src/main/java/com/msdw/tms/controller/QuestionsController.java b/src/main/java/com/msdw/tms/controller/QuestionsController.java index f4c0cef..6c05485 100644 --- a/src/main/java/com/msdw/tms/controller/QuestionsController.java +++ b/src/main/java/com/msdw/tms/controller/QuestionsController.java @@ -89,10 +89,13 @@ public class QuestionsController implements QuestionsControllerApi { /** * 是否禁用试题 */ - @Override +// @Override @PutMapping("/isenable") - //@RequiresPermissions("qms:questions:isenable") - public R isNable(Integer id) { +// 2020.09.18 +// @RequiresPermissions("qms:questions:isenable") +// public R isNable(@RequestBody Integer id) { + public R isNable(@RequestBody List idList) { + Integer id = idList.get(0); boolean b = questionsService.isEnable(id); return b ? R.ok() : R.error(); @@ -102,7 +105,7 @@ public class QuestionsController implements QuestionsControllerApi { * 删除 */ @Override - @DeleteMapping("/delete") + @PostMapping("/delete") //@RequiresPermissions("qms:questions:delete") public R delete(@RequestBody Integer[] ids) { boolean delete = questionsService.deleteByIds(Arrays.asList(ids)); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3193dfa..1c19f32 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -5,9 +5,12 @@ spring: # url: jdbc:mysql://www.liuwanr.cn:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai # username: super # password: huoran888 - url: jdbc:mysql://localhost:3306/msdw_tms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai - username: root - password: root + url: jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai + username: super + password: huoran888 +# url: jdbc:mysql://localhost:3306/msdw_tms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai +# username: root +# password: root driver-class-name: com.mysql.jdbc.Driver # redis: # host: www.liuwanr.cn diff --git a/src/main/resources/mapper/tms/ProjectDao.xml b/src/main/resources/mapper/tms/ProjectDao.xml index 42b691a..7d37ec2 100644 --- a/src/main/resources/mapper/tms/ProjectDao.xml +++ b/src/main/resources/mapper/tms/ProjectDao.xml @@ -20,11 +20,15 @@ + + + + \ No newline at end of file