wangwei 6 yıl önce
ebeveyn
işleme
4040742723

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

@@ -93,6 +93,7 @@ public class HandleSyncCloudServiceProvider extends ControllerSupport
 	public SyncStudentResp syncStudent(@RequestBody SyncStudentReq req) {
 		String name = req.getName();
 		Long id = req.getId();
+		String studentCode = req.getStudentCode();
 
 		if (StringUtils.isBlank(name)) {
 			throw new StatusException("B-100001", "name is null");
@@ -101,7 +102,7 @@ public class HandleSyncCloudServiceProvider extends ControllerSupport
 			throw new StatusException("B-100002", "id is null");
 		}
 
-		examStudentRepo.updateStudent(name, id);
+		examStudentRepo.updateStudent(name, studentCode, id);
 		return null;
 	}
 

+ 2 - 2
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/ExamStudentRepo.java

@@ -28,8 +28,8 @@ public interface ExamStudentRepo
 			Long courseId);
 
 	@Modifying
-	@Query("update ExamStudentEntity s set s.name = ?1  where s.studentId = ?2")
-	void updateStudent(String name, Long studentId);
+	@Query("update ExamStudentEntity s set s.name = ?1, s.studentCode=?2 where s.studentId = ?3")
+	void updateStudent(String name, String studentCode, Long studentId);
 
 	@Modifying
 	@Query("update ExamStudentEntity s set s.courseName = ?1, s.courseLevel  = ?2  where s.courseId = ?3")