wangwei 7 năm trước cách đây
mục cha
commit
cd8a32c7ea

+ 4 - 2
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/ExamStudentController.java

@@ -276,9 +276,10 @@ public class ExamStudentController extends ControllerSupport {
 	@PostMapping()
 	public ExamStudentDomain addExamStudent(HttpServletRequest request,
 			@RequestBody ExamStudentDomain examStudent) {
+		trim(examStudent);
 		Long rootOrgId = getRootOrgId();
 		examStudent.setRootOrgId(rootOrgId);
-		examStudent.setInfoCollector(getAccessUser().getDisplayName());
+		examStudent.setInfoCollector(examStudent.getInfoCollector());
 		return saveExamStudent(examStudent);
 	}
 
@@ -293,9 +294,10 @@ public class ExamStudentController extends ControllerSupport {
 	@ApiOperation(value = "更新考试学生", notes = "更新")
 	@PutMapping()
 	public ExamStudentDomain updateExamStudent(@RequestBody ExamStudentDomain examStudent) {
+		trim(examStudent);
 		Long rootOrgId = getRootOrgId();
 		examStudent.setRootOrgId(rootOrgId);
-		examStudent.setInfoCollector(getAccessUser().getDisplayName());
+		examStudent.setInfoCollector(examStudent.getInfoCollector());
 		return saveExamStudent(examStudent);
 	}
 

+ 1 - 2
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/provider/ExamStudentCloudServiceProvider.java

@@ -149,13 +149,12 @@ public class ExamStudentCloudServiceProvider extends ControllerSupport
 			examStudent = examStudentList.get(0);
 		} else {
 			examStudent = new ExamStudent();
-			examStudent.setInfoCollector(req.getInfoCollector());
 			examStudent.setNormalExamTimes(0);
 			examStudent.setFinished(false);
 			examStudent.setIsReexamine(false);
 			examStudent.setCanUpload(false);
 		}
-
+		examStudent.setInfoCollector(req.getInfoCollector());
 		examStudent.setName(studentInfo.getName());
 		examStudent.setRootOrgId(rootOrgId);
 		examStudent.setCourseCode(courseCode);