123
This commit is contained in:
@@ -122,6 +122,9 @@ public class CaiLoginManager {
|
||||
if(!BCrypt.checkpw(password, user.getPassword())){
|
||||
RAtomicLong atomicLong = redissonClient.getAtomicLong(key);
|
||||
Long passwordMaxNum = systemConfigManager.getSystemConfigOfLong(SystemConfigEnum.LOGIN_PASSWORD_ERROR_MAX_NUM);
|
||||
if(passwordMaxNum <= 0){
|
||||
throw new ServiceException("用户不存在或密码错误");
|
||||
}
|
||||
long num = atomicLong.incrementAndGet();
|
||||
if(num >= passwordMaxNum){
|
||||
String error = String.format("密码错误次数超过%s次,账号已被封禁,请联系客服解锁", passwordMaxNum);
|
||||
|
||||
Reference in New Issue
Block a user