WANG 6 years ago
parent
commit
4766c34ba1

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

@@ -240,10 +240,6 @@ public class StudentServiceImpl implements StudentService {
 	public StudentInfo getStudentInfo(Long rootOrgId, Long studentId, String identityNumber,
 			String studentCode, String securityPhone) {
 
-		if (null == rootOrgId) {
-			throw new StatusException("160250", "rootOrgId is null");
-		}
-
 		StudentEntity s = null;
 		int count = 0;
 		if (null != studentId) {
@@ -251,6 +247,10 @@ public class StudentServiceImpl implements StudentService {
 			s = GlobalHelper.getEntity(studentRepo, studentId, StudentEntity.class);
 		}
 
+		if (null == rootOrgId) {
+			throw new StatusException("160250", "rootOrgId is null");
+		}
+
 		if (StringUtils.isNotBlank(identityNumber)) {
 			count++;
 			s = studentRepo.findByIdentityNumberAndRootOrgId(identityNumber, rootOrgId);