| | |
| | | package com.gkhy.exam.admin.app; |
| | | |
| | | |
| | | import com.gkhy.exam.common.annotation.RepeatSubmit; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.ExQuestionBank; |
| | | import com.gkhy.exam.system.service.ExQuestionBankService; |
| | |
| | | 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.*; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private ExQuestionBankService questionBankService; |
| | | |
| | | @PreAuthorize("hasAnyAuthority('train:exam:student')") |
| | | @ApiOperation(value = "题库列表(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | |
| | | return CommonResult.success(questionBankService.selectQuestionBankListForStudent(questionBank)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAnyAuthority('train:exam:student')") |
| | | @ApiOperation(value = "根据id获取题库信息") |
| | | @GetMapping(value = { "/{bankId}" }) |
| | | public CommonResult getQuestionBankInfo(@PathVariable(value = "bankId", required = true) Long bankId) |
| | |
| | | return CommonResult.success(questionBankService.selectQuestionBankByIdForStudent(bankId)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @PreAuthorize("hasAnyAuthority('train:exam:student')") |
| | | @ApiOperation(value = "清除刷题记录") |
| | | @GetMapping(value = { "/clearExerciseRecord" }) |
| | | public CommonResult clearExerciseRecord(@RequestParam(value = "bankId", required = true) Long bankId) |