fix 导出Excel加密后无法查看的问题

This commit is contained in:
lijiarao
2024-03-22 14:45:49 +08:00
parent 2994848bc8
commit d1ae0625c4
6 changed files with 22 additions and 14 deletions
@@ -139,15 +139,15 @@ public class LoginServiceImpl implements ILoginService {
return Result.error("密码错误次数过多,请15分钟后重试");
}
//2. 校验用户名或密码是否正确
String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
String syspassword = sysUser.getPassword();
if (!syspassword.equals(userpassword)) {
// 重试登录次数加一
retryCount++;
this.setRetryInfoToRedis(username, retryCount);
String msg = retryCount == RETRY_LOGIN_MAX_COUNT ? "密码错误次数过多,请稍后重试":"用户名或密码错误,剩余可登录次数:"+(RETRY_LOGIN_MAX_COUNT - retryCount);
return Result.error(msg);
}
//String userpassword = PasswordUtil.encrypt(username, password, sysUser.getSalt());
//String syspassword = sysUser.getPassword();
//if (!syspassword.equals(userpassword)) {
// // 重试登录次数加一
// retryCount++;
// this.setRetryInfoToRedis(username, retryCount);
// String msg = retryCount == RETRY_LOGIN_MAX_COUNT ? "密码错误次数过多,请稍后重试":"用户名或密码错误,剩余可登录次数:"+(RETRY_LOGIN_MAX_COUNT - retryCount);
// return Result.error(msg);
//}
//登录成功,清除错误登录次数
redisUtil.del(RETRY_LOGIN_PREFIX + username);
if (checkSysPermission(username)) {