文件名从 exam-admin/src/main/java/com/gkhy/exam/admin/web/ExPaperStudentController.java 修改 |
| | |
| | | package com.gkhy.exam.admin.web; |
| | | package com.gkhy.exam.admin.controller.web; |
| | | |
| | | |
| | | import com.gkhy.exam.common.annotation.Log; |
| | |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.enums.BusinessType; |
| | | import com.gkhy.exam.system.domain.ExPaperStudent; |
| | | import com.gkhy.exam.system.domain.vo.BatchPaperStudentVO; |
| | | import com.gkhy.exam.system.domain.vo.ExPaperStudentVO; |
| | | import com.gkhy.exam.system.service.ExPaperStudentService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | return CommonResult.success(paperStudentService.selectPaperStudentList(paperStudent)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据id查询学员试卷信息") |
| | | @GetMapping(value = { "/getPaperStudentById" }) |
| | | public CommonResult getPaperStudentById(@RequestParam(value = "paperStudentId", required = true) Long paperStudentId) |
| | | { |
| | | return CommonResult.success(paperStudentService.selectPaperStudentById(paperStudentId)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | | @Log(title = "试卷与学员关系管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增学员") |
| | |
| | | |
| | | @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(@RequestBody Map<String,Object> paperStudentMap){ |
| | | return CommonResult.success(paperStudentService.batchAddPaperStudent(paperStudentMap)); |
| | | public CommonResult batchAdd(@Validated @RequestBody BatchPaperStudentVO batchPaperStudent){ |
| | | return CommonResult.success(paperStudentService.batchAddPaperStudent(batchPaperStudent)); |
| | | } |
| | | |
| | | @RepeatSubmit |
| | |
| | | @Log(title = "试卷与学员关系管理", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除学员") |
| | | @DeleteMapping(value = { "/batchDelete" }) |
| | | public CommonResult batchDelete( List<Long> paperStudentIds){ |
| | | public CommonResult batchDelete(@RequestBody List<Long> paperStudentIds){ |
| | | paperStudentService.batchDeletePaperStudent(paperStudentIds); |
| | | return CommonResult.success(); |
| | | } |
| | |
| | | paperStudentService.checkStudentUnique(Collections.singletonList(paperStudent)); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "提交批改试卷") |
| | | @PostMapping("/doReview") |
| | | public CommonResult doReview(@RequestBody ExPaperStudentVO paperStudentVO) |
| | | { |
| | | paperStudentService.doReview(paperStudentVO); |
| | | return CommonResult.success(); |
| | | } |
| | | } |