Преглед на файлове

增加更新学生缺考状态

ting.yin преди 8 години
родител
ревизия
6d641e29c4
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      exam-work-api/src/main/java/cn/com/qmth/examcloud/service/examwork/api/ExamStudentApi.java

+ 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}")