|
@@ -155,15 +155,15 @@ public class AuthServiceImpl implements AuthService {
|
|
if (AccountType.COMMON_LOGIN_NAME.equals(accountTypeEnum)) {
|
|
if (AccountType.COMMON_LOGIN_NAME.equals(accountTypeEnum)) {
|
|
UserEntity userEntity = userRepo.findByRootOrgIdAndLoginName(rootOrgId, accountValue);
|
|
UserEntity userEntity = userRepo.findByRootOrgIdAndLoginName(rootOrgId, accountValue);
|
|
if (null == userEntity) {
|
|
if (null == userEntity) {
|
|
- throw new StatusException("B-001004", "用户不存在");
|
|
|
|
|
|
+ throw new StatusException("B-001004", "账号或密码错误");
|
|
}
|
|
}
|
|
if (null != userEntity.getEnable() && !userEntity.getEnable()) {
|
|
if (null != userEntity.getEnable() && !userEntity.getEnable()) {
|
|
- throw new StatusException("B-001005", "账户被禁用");
|
|
|
|
|
|
+ throw new StatusException("B-001005", "账号被禁用");
|
|
}
|
|
}
|
|
String rightPassword = userEntity.getPassword();
|
|
String rightPassword = userEntity.getPassword();
|
|
if (!rightPassword.equals(password)) {
|
|
if (!rightPassword.equals(password)) {
|
|
whenPasswordError(accountType, accountValue);
|
|
whenPasswordError(accountType, accountValue);
|
|
- throw new StatusException("B-001003", "密码错误");
|
|
|
|
|
|
+ throw new StatusException("B-001003", "账号或密码错误");
|
|
}
|
|
}
|
|
user.setUserId(userEntity.getId());
|
|
user.setUserId(userEntity.getId());
|
|
user.setUserType(UserType.COMMON);
|
|
user.setUserType(UserType.COMMON);
|
|
@@ -184,7 +184,7 @@ public class AuthServiceImpl implements AuthService {
|
|
}
|
|
}
|
|
|
|
|
|
if (null == student) {
|
|
if (null == student) {
|
|
- throw new StatusException("B-001110", "学生不存在");
|
|
|
|
|
|
+ throw new StatusException("B-001110", "账号或密码错误");
|
|
}
|
|
}
|
|
if (null != student.getEnable() && !student.getEnable()) {
|
|
if (null != student.getEnable() && !student.getEnable()) {
|
|
throw new StatusException("B-001005", "账户被禁用");
|
|
throw new StatusException("B-001005", "账户被禁用");
|
|
@@ -192,7 +192,7 @@ public class AuthServiceImpl implements AuthService {
|
|
String rightPassword = student.getPassword();
|
|
String rightPassword = student.getPassword();
|
|
if (!rightPassword.equals(password)) {
|
|
if (!rightPassword.equals(password)) {
|
|
whenPasswordError(accountType, accountValue);
|
|
whenPasswordError(accountType, accountValue);
|
|
- throw new StatusException("B-001003", "密码错误");
|
|
|
|
|
|
+ throw new StatusException("B-001003", "账号或密码错误");
|
|
}
|
|
}
|
|
|
|
|
|
user.setUserId(student.getId());
|
|
user.setUserId(student.getId());
|