Selaa lähdekoodia

Merge branch 'master' of https://git.oschina.net/songyue123456/ExamCloud-service-exam-work.git

ting.yin 7 vuotta sitten
vanhempi
commit
b5932ed49b

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

@@ -161,8 +161,8 @@ public class ExamStudentApi {
 
     @ApiOperation(value = "按ID查询考试学生", notes = "ID查询")
     @GetMapping("/{id}")
-    public ResponseEntity<ExamStudent> getExamStudentById(@PathVariable Long id) {
-        return new ResponseEntity<ExamStudent>(examStudentRepo.findOne(id), HttpStatus.OK);
+    public ResponseEntity getExamStudentById(@PathVariable Long id) {
+        return new ResponseEntity(examStudentService.findById(id), HttpStatus.OK);
     }
 
     @ApiOperation(value = "新增考试学生", notes = "新增")

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

@@ -151,6 +151,12 @@ public class ExamStudentService {
 		}
 	}
 
+	public ExamStudent findById(Long id){
+		ExamStudent examStudent = examStudentRepo.findOne(id);
+		setExamOrgTime(examStudent);
+		return examStudent;
+	}
+
     /**
      * 按考试批次获取学生
      * @param examId