wangwei il y a 7 ans
Parent
commit
a8506f549f

+ 3 - 1
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/StudentCloudServiceProvider.java

@@ -63,13 +63,15 @@ public class StudentCloudServiceProvider extends ControllerSupport implements St
 		studentInfo.setRemark(req.getRemark());
 
 		Student student = studentService.insertOrUpdateStudent(studentInfo);
-		InsertOrUpdateStudentResp resp = new InsertOrUpdateStudentResp();
 
+		InsertOrUpdateStudentResp resp = new InsertOrUpdateStudentResp();
+		resp.setStudentId(student.getId());
 		resp.setRootOrgId(student.getRootOrgId());
 
 		Org org = orgRepo.findOne(student.getOrgId());
 		resp.setOrgId(org.getId());
 		resp.setOrgName(org.getName());
+
 		return resp;
 	}
 

+ 4 - 3
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/StudentServiceImpl.java

@@ -177,7 +177,7 @@ public class StudentServiceImpl implements StudentService {
 		if (null != studentByIdentity) {
 			String curStudentCode = studentByIdentity.getStudentCode();
 			if (StringUtils.isNotBlank(curStudentCode) && !curStudentCode.equals(studentCode)) {
-				throw new StatusException("B-160005", "studentCode is wrong");
+				throw new StatusException("B-160005", "身份证对应得");
 			}
 		}
 
@@ -203,14 +203,15 @@ public class StudentServiceImpl implements StudentService {
 			}
 		}
 
+		updatedStudent.setRootOrgId(rootOrgId);
 		updatedStudent.setName(studentInfo.getName());
 		updatedStudent.setIdentityNumber(identityNumber);
 		updatedStudent.setStudentCode(studentCode);
 		updatedStudent.setOrgId(orgId);
-		if (null != studentInfo.getPhotoPath()) {
+		if (StringUtils.isNotBlank(studentInfo.getPhotoPath())) {
 			updatedStudent.setPhotoPath(studentInfo.getPhotoPath());
 		}
-		if (null != studentInfo.getPhoneNumber()) {
+		if (StringUtils.isNotBlank(studentInfo.getPhoneNumber())) {
 			updatedStudent.setPhoneNumber(studentInfo.getPhoneNumber());
 		}
 		if (null != studentInfo.getRemark()) {