wangwei пре 7 година
родитељ
комит
5248f43114

+ 5 - 0
examcloud-core-basic-base/src/main/java/cn/com/qmth/examcloud/core/basic/base/enums/AccountType.java

@@ -14,6 +14,11 @@ public enum AccountType {
 	 */
 	STUDENT_CODE("STUDENT_CODE", "学生学号"),
 
+	/**
+	 * 学生手机号
+	 */
+	STUDENT_PHONE_NUMBER("STUDENT_PHONE_NUMBER", "学生手机号"),
+
 	/**
 	 * 学生身份证号
 	 */

+ 3 - 0
examcloud-core-basic-dao/src/main/java/cn/com/qmth/examcloud/core/basic/dao/OrgRepo.java

@@ -34,4 +34,7 @@ public interface OrgRepo
 	@Query(nativeQuery = true, value = "select * from ecs_core_org t where t.parent_id is null and t.code=:code ")
 	Org findRootOrg(@Param("code") String code);
 
+	@Query(nativeQuery = true, value = "select * from ecs_core_org t where t.parent_id is null and t.id =:rootOrgId ")
+	Org findRootOrg(@Param("rootOrgId") Long rootOrgId);
+
 }

+ 5 - 1
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/AuthServiceImpl.java

@@ -78,6 +78,11 @@ public class AuthServiceImpl implements AuthService {
 	@Override
 	public User login(LoginInfo loginInfo) {
 
+		String accountType = loginInfo.getAccountType();
+		if (AccountType.COMMON_LOGIN_NAME.getCode().equals(accountType)) {
+
+		}
+
 		String rootOrgId = loginInfo.getRootOrgId();
 		Org rootOrg = null;
 		if (StringUtils.isBlank(rootOrgId)) {
@@ -99,7 +104,6 @@ public class AuthServiceImpl implements AuthService {
 			}
 		}
 
-		String accountType = loginInfo.getAccountType();
 		String accountValue = loginInfo.getAccountValue();
 		String password = loginInfo.getPassword();