|
@@ -178,12 +178,11 @@ public class ExamStudentApi {
|
|
|
|
|
|
@ApiOperation(value = "按ID删除考试学生", notes = "删除")
|
|
@ApiOperation(value = "按ID删除考试学生", notes = "删除")
|
|
@DeleteMapping("/{id}")
|
|
@DeleteMapping("/{id}")
|
|
- public ResponseEntity deleteExamStudent(@PathVariable Long id) {
|
|
|
|
-// List<Long> examStuIds = Stream.of(id.split(",")).map(s->Long.parseLong(s.trim()))
|
|
|
|
-// .collect(Collectors.toList());
|
|
|
|
-// examStudentRepo.deleteInBatch(examStudentRepo.findByIdIn(examStuIds));
|
|
|
|
|
|
+ public ResponseEntity deleteExamStudent(@PathVariable String id) {
|
|
|
|
+ List<Long> examStuIds = Stream.of(id.split(",")).map(s->Long.parseLong(s.trim()))
|
|
|
|
+ .collect(Collectors.toList());
|
|
try {
|
|
try {
|
|
- examStudentService.deleteExamStudent(id);
|
|
|
|
|
|
+ examStudentService.deleteExamStudent(examStuIds);
|
|
return new ResponseEntity(HttpStatus.OK);
|
|
return new ResponseEntity(HttpStatus.OK);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|