| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | @Autowired |
| | | private ExQuestionService questionService; |
| | | |
| | | |
| | | @PreAuthorize("hasAnyAuthority('train:exam:student')") |
| | | @ApiOperation(value = "刷题获取题目ID列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "bankId", dataType = "long", required = false, value = "题库id"), |
| | |
| | | return CommonResult.success(questionService.getExerciseQuestionList(bankId,exerciseType)); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAnyAuthority('train:exam:student')") |
| | | @ApiOperation(value = "刷题根据题目ID获取题目详情") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "questionId", dataType = "long", required = true, value = "题目id") |
| | |
| | | return CommonResult.success(questionService.getExerciseQuestionById(questionId)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAnyAuthority('train:exam:student')") |
| | | @ApiOperation(value = "刷题根据题目ID列表批量获取题目详情") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "questionIds", dataType = "list", required = true, value = "题目id列表") |
| | |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAnyAuthority('train:exam:student')") |
| | | @ApiOperation(value = "刷题获取错题题目ID列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "bankId", dataType = "long", required = false, value = "题库id") |
| | |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAnyAuthority('train:exam:student')") |
| | | @ApiOperation(value = "考试获取题目ID列表(考试完成返回错对,未完成则不返回)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "bankId", dataType = "long", required = false, value = "考卷id"), |
| | |
| | | return CommonResult.success(questionService.getPaperQuestionList(paperId,viewType)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAnyAuthority('train:exam:student')") |
| | | @ApiOperation(value = "考试根据题目ID获取题目详情(考试完成返回答案,未完成则不返回)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "paperId", dataType = "long", required = true, value = "试卷id"), |
| | |
| | | return CommonResult.success(questionService.getPaperQuestionById(paperId,questionId)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAnyAuthority('train:exam:student')") |
| | | @ApiOperation(value = "考试根据题目ID列表批量获取题目详情") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "paperId", dataType = "long", required = true, value = "试卷id"), |