rev:用户锁定,解锁后无法登陆问题
This commit is contained in:
@@ -268,6 +268,9 @@ public class OnlineUserService {
|
|||||||
if (userInfo == null) {
|
if (userInfo == null) {
|
||||||
throw new BadRequestException("当前用户不存在!");
|
throw new BadRequestException("当前用户不存在!");
|
||||||
}
|
}
|
||||||
|
if (userInfo.getIs_used() == false) {
|
||||||
|
throw new BadRequestException("当前用户已被锁定!");
|
||||||
|
}
|
||||||
String userName = userInfo.getUsername();
|
String userName = userInfo.getUsername();
|
||||||
if (!userInfo.getPassword().equals(SaSecureUtil.md5BySalt(password, "salt"))) {
|
if (!userInfo.getPassword().equals(SaSecureUtil.md5BySalt(password, "salt"))) {
|
||||||
Boolean aBoolean = redisTemplate.hasKey("LoginName:" + userName);
|
Boolean aBoolean = redisTemplate.hasKey("LoginName:" + userName);
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public class ISysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> imp
|
|||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new RuntimeException();
|
throw new RuntimeException();
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(sysUser.getPassword())) {
|
if (ObjectUtil.isNotEmpty(sysUser.getPassword()) && sysUser.getPassword().length() != 32) {
|
||||||
sysUser.setPassword(SaSecureUtil.md5BySalt(sysUser.getPassword(), GeneralDefinition.SALT));
|
sysUser.setPassword(SaSecureUtil.md5BySalt(sysUser.getPassword(), GeneralDefinition.SALT));
|
||||||
}
|
}
|
||||||
sysUser.setUpdate_time(new Date());
|
sysUser.setUpdate_time(new Date());
|
||||||
|
|||||||
Reference in New Issue
Block a user