From daf7acb4f107a427e4a83ba1eb26e5e6012cbdaf Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: Wed, 26 Jun 2024 17:04:52 +0800
Subject: [PATCH] update
---
exam-admin/src/main/java/com/gkhy/exam/admin/web/ExPaperStudentController.java | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 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/web/ExPaperStudentController.java
index af6c380..20b2a6a 100644
--- a/exam-admin/src/main/java/com/gkhy/exam/admin/web/ExPaperStudentController.java
+++ b/exam-admin/src/main/java/com/gkhy/exam/admin/web/ExPaperStudentController.java
@@ -2,6 +2,7 @@
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;
@@ -16,6 +17,7 @@
import java.util.Collections;
import java.util.List;
+import java.util.Map;
/**
* <p>
@@ -35,13 +37,15 @@
@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
@@ -49,21 +53,29 @@
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){
--
Gitblit v1.9.2