From f0f00e9ba8a755e4317e029d73b69a92ad9f9df1 Mon Sep 17 00:00:00 2001 From: kongzy <kongzy> Date: 星期六, 14 九月 2024 17:02:41 +0800 Subject: [PATCH] update --- exam-admin/src/main/java/com/gkhy/exam/admin/controller/web/ExPaperStudentController.java | 32 ++++++++++++++++++++++---------- 1 files changed, 22 insertions(+), 10 deletions(-) diff --git a/exam-admin/src/main/java/com/gkhy/exam/admin/web/ExPaperStudentController.java b/exam-admin/src/main/java/com/gkhy/exam/admin/controller/web/ExPaperStudentController.java similarity index 77% rename from exam-admin/src/main/java/com/gkhy/exam/admin/web/ExPaperStudentController.java rename to exam-admin/src/main/java/com/gkhy/exam/admin/controller/web/ExPaperStudentController.java index 20b2a6a..9cbf75b 100644 --- a/exam-admin/src/main/java/com/gkhy/exam/admin/web/ExPaperStudentController.java +++ b/exam-admin/src/main/java/com/gkhy/exam/admin/controller/web/ExPaperStudentController.java @@ -1,4 +1,4 @@ -package com.gkhy.exam.admin.web; +package com.gkhy.exam.admin.controller.web; import com.gkhy.exam.common.annotation.Log; @@ -6,6 +6,8 @@ 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; @@ -17,7 +19,6 @@ import java.util.Collections; import java.util.List; -import java.util.Map; /** * <p> @@ -45,6 +46,13 @@ 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 = "新增学员") @@ -55,15 +63,10 @@ @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 @@ -78,7 +81,7 @@ @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(); } @@ -90,4 +93,13 @@ paperStudentService.checkStudentUnique(Collections.singletonList(paperStudent)); return CommonResult.success(); } + + + @ApiOperation(value = "提交批改试卷") + @PostMapping("/doReview") + public CommonResult doReview(@RequestBody ExPaperStudentVO paperStudentVO) + { + paperStudentService.doReview(paperStudentVO); + return CommonResult.success(); + } } -- Gitblit v1.9.2