| | |
| | | |
| | | |
| | | import com.gkhy.exam.common.annotation.Log; |
| | | import com.gkhy.exam.common.annotation.RepeatSubmit; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.enums.BusinessType; |
| | | import com.gkhy.exam.system.domain.ExPaperStudent; |
| | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @ApiOperation(value = "考卷下的学员列表(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10") |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | @ApiImplicitParam(paramType = "query", name = "paperId", dataType = "long", required = true, value = "考卷id") |
| | | }) |
| | | @GetMapping("/list") |
| | | public CommonResult list(ExPaperStudent paperStudent){ |
| | | return CommonResult.success(paperStudentService.selectPaperStudentList(paperStudent)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @Log(title = "试卷与学员关系管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增学员") |
| | | @PostMapping |
| | |
| | | return CommonResult.success(paperStudentService.addPaperStudent(paperStudent)); |
| | | } |
| | | |
| | | @Log(title = "试卷与学员关系管理", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit |
| | | @Log(title = "试卷与学员关系管理", businessType = BusinessType.INSERT) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "body", name = "phaseIds", dataType = "array", required = false, value = "批次id列表"), |
| | | @ApiImplicitParam(paramType = "query", name = "studentIds", dataType = "array", required = false, value = "学员id列表(批次id和学员id列表只能传一个)"), |
| | | @ApiImplicitParam(paramType = "query", name = "paperId", dataType = "long", required = true, value = "考卷id") |
| | | }) |
| | | @ApiOperation(value = "批量新增学员") |
| | | @PostMapping("/batchAdd") |
| | | public CommonResult batchAdd(@Validated @RequestBody List<ExPaperStudent> paperStudents){ |
| | | return CommonResult.success(paperStudentService.batchAddPaperStudent(paperStudents)); |
| | | public CommonResult batchAdd(@RequestBody Map<String,Object> paperStudentMap){ |
| | | return CommonResult.success(paperStudentService.batchAddPaperStudent(paperStudentMap)); |
| | | } |
| | | |
| | | @Log(title = "试卷与学员关系管理", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit |
| | | @Log(title = "试卷与学员关系管理", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除学员") |
| | | @DeleteMapping(value = { "/{phaseStudentId}" }) |
| | | public CommonResult delete(@PathVariable(value = "phaseStudentId", required = true) Long paperStudentId){ |
| | | return CommonResult.success(paperStudentService.deletePaperStudent(paperStudentId)); |
| | | } |
| | | |
| | | @Log(title = "试卷与学员关系管理", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit |
| | | @Log(title = "试卷与学员关系管理", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除学员") |
| | | @DeleteMapping(value = { "/batchDelete" }) |
| | | public CommonResult batchDelete( List<Long> paperStudentIds){ |