| | |
| | | return selfPracticeService.page(vo); |
| | | } |
| | | |
| | | /** |
| | | * 获取所选课目下的题目数量 |
| | | * |
| | | * @param subjectIds |
| | | * @return |
| | | */ |
| | | @PostMapping("/subject/questionNum") |
| | | public RestResponse subjectQuestionNum(@RequestBody List<Integer> subjectIds) { |
| | | return selfPracticeService.subjectQuestionNum(subjectIds); |
| | | } |
| | | |
| | | @PostMapping("/remove") |
| | | public RestResponse remove(@RequestBody @NotEmpty(message = "请选择要删除的数据") List<Integer> ids) { |
| | | return selfPracticeService.remove(ids); |
| | |
| | | return selfPracticeService.startPractice(id); |
| | | } |
| | | |
| | | /** |
| | | * 开始看题 |
| | | * |
| | | * @param id 练习id |
| | | * @return |
| | | */ |
| | | @PostMapping("/start/look/{id}") |
| | | public RestResponse startLook(@PathVariable("id") Integer id) { |
| | | return selfPracticeService.startLook(id); |
| | | } |
| | | |
| | | /** |
| | | * 随机一道题 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/random/{id}") |
| | | public RestResponse randomOneQuestion(@PathVariable("id") Integer id) { |
| | | return selfPracticeService.randomOneQuestion(id); |
| | | } |
| | | |
| | | } |