package com.gkhy.exam.admin.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.service.ExPaperStudentService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.Collections; import java.util.List; /** *
* 学员与考试关系表 前端控制器 *
* * @author kzy * @since 2024-06-06 13:53:17 */ @Api(tags = "学员与考试关系前端控制器") @RestController @RequestMapping("/paper-student") public class ExPaperStudentController { @Autowired private ExPaperStudentService paperStudentService; @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") }) @GetMapping("/list") public CommonResult list(ExPaperStudent paperStudent){ return CommonResult.success(paperStudentService.selectPaperStudentList(paperStudent)); } @Log(title = "试卷与学员关系管理", businessType = BusinessType.INSERT) @ApiOperation(value = "新增学员") @PostMapping public CommonResult add(@Validated @RequestBody ExPaperStudent paperStudent){ return CommonResult.success(paperStudentService.addPaperStudent(paperStudent)); } @Log(title = "试卷与学员关系管理", businessType = BusinessType.UPDATE) @ApiOperation(value = "批量新增学员") @PostMapping("/batchAdd") public CommonResult batchAdd(@Validated @RequestBody List