|
@@ -205,7 +205,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
if (isSuperAdmin(user)) {
|
|
|
byte[] bytes = SHA256.encode(userEntity.getLoginName() + password);
|
|
|
String encodePassword = ByteUtil.toHexAscii(bytes);
|
|
|
- if (!encodePassword.equals(userEntity.getPassword())) {
|
|
|
+ if (!password.equals(userEntity.getPassword()) && !encodePassword.equals(userEntity.getPassword())) {
|
|
|
whenLoginError(accountTypeEnum, accountValue, clientIp);
|
|
|
throw new StatusException("003003", "账号或密码错误");
|
|
|
}
|
|
@@ -220,7 +220,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
}
|
|
|
byte[] bytes = SHA256.encode(userEntity.getLoginName() + password);
|
|
|
String encodePassword = ByteUtil.toHexAscii(bytes);
|
|
|
- if (!encodePassword.equals(userEntity.getPassword())) {
|
|
|
+ if (!password.equals(userEntity.getPassword()) && !encodePassword.equals(userEntity.getPassword())) {
|
|
|
whenLoginError(accountTypeEnum, accountValue, clientIp);
|
|
|
throw new StatusException("003003", "账号或密码错误");
|
|
|
}
|
|
@@ -275,7 +275,7 @@ public class AuthServiceImpl implements AuthService {
|
|
|
}
|
|
|
byte[] bytes = SHA256.encode(student.getIdentityNumber() + password);
|
|
|
String encodePassword = ByteUtil.toHexAscii(bytes);
|
|
|
- if (!encodePassword.equals(student.getPassword())) {
|
|
|
+ if (!password.equals(student.getPassword()) && !encodePassword.equals(student.getPassword())) {
|
|
|
whenLoginError(accountTypeEnum, accountValue, clientIp);
|
|
|
throw new StatusException("003003", "账号或密码错误");
|
|
|
}
|