|
@@ -125,7 +125,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
if (null == student) {
|
|
|
throw new StatusException("B-001110", "学生不存在");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
user.setUserType(UserType.STUDENT.getCode());
|
|
|
user.setStudentId(student.getId());
|
|
|
user.setStudentCode(student.getStudentCode());
|
|
@@ -142,14 +142,18 @@ public class AuthServiceImpl implements AuthService {
|
|
|
roleList.add(userRole);
|
|
|
userEntity.setUserRoles(roleList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
String rightPassword = userEntity.getPassword();
|
|
|
if (!rightPassword.equals(password)) {
|
|
|
throw new StatusException("B-001003", "密码错误");
|
|
|
}
|
|
|
|
|
|
+ if (!userEntity.getEnable()) {
|
|
|
+ throw new StatusException("B-001005", "账户被禁用");
|
|
|
+ }
|
|
|
+
|
|
|
user.setUserId(userEntity.getId());
|
|
|
-
|
|
|
+
|
|
|
user.setRootOrgId(userEntity.getRootOrgId());
|
|
|
user.setRootOrgName(rootOrg.getName());
|
|
|
user.setOrgId(userEntity.getOrgId());
|