|
@@ -336,8 +336,12 @@ public class SysController {
|
|
if (Objects.isNull(user)) {
|
|
if (Objects.isNull(user)) {
|
|
throw ExceptionResultEnum.ERROR.exception("用户不存在");
|
|
throw ExceptionResultEnum.ERROR.exception("用户不存在");
|
|
}
|
|
}
|
|
- if (!password.equals(user.getPassword())) {
|
|
|
|
- throw ExceptionResultEnum.ERROR.exception("密码错误");
|
|
|
|
|
|
+ if (StringUtils.isBlank(password)) {
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("密码不能为空");
|
|
|
|
+ }
|
|
|
|
+ String decodePassword = Base64Util.encode(RSAUtil.decrypt(password).getBytes());
|
|
|
|
+ if (!decodePassword.equals(user.getPassword())) {
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("用户名或密码错误");
|
|
}
|
|
}
|
|
String mobileNumber = user.getMobileNumber();
|
|
String mobileNumber = user.getMobileNumber();
|
|
if (Objects.isNull(mobileNumber)) {
|
|
if (Objects.isNull(mobileNumber)) {
|