Quellcode durchsuchen

增加更新学生缺考状态

ting.yin vor 8 Jahren
Ursprung
Commit
6d641e29c4

+ 8 - 0
exam-work-api/src/main/java/cn/com/qmth/examcloud/service/examwork/api/ExamStudentApi.java

@@ -79,6 +79,14 @@ public class ExamStudentApi {
     public ResponseEntity updateExamStudent(@RequestBody ExamStudent examStudent){
         return new ResponseEntity(examStudentService.saveExamStudent(examStudent),HttpStatus.OK);
     }
+    
+    @ApiOperation(value="更新考试学生缺考状态",notes = "更新缺考")
+    @PutMapping("/{id}")
+    public ResponseEntity<ExamStudent> getExamStudentById(@PathVariable Long id,@RequestParam boolean finished){
+    	ExamStudent examStudent = examStudentRepo.findOne(id);
+    	examStudent.setFinished(finished);
+        return new ResponseEntity<ExamStudent>(examStudentRepo.save(examStudent),HttpStatus.OK);
+    }
 
     @ApiOperation(value="按ID删除考试学生",notes = "删除")
     @DeleteMapping("/{id}")