1
0

feat: 合并代码

This commit is contained in:
TsMask
2023-10-17 19:43:49 +08:00
parent 5f5a2e2e9e
commit e2d17640ef
10 changed files with 100 additions and 41 deletions

View File

@@ -128,11 +128,12 @@ func (s *AccountImpl) passwordRetryCount(username string) (string, int64, time.D
retryCount = "0"
}
// 是否超过错误值
if parse.Number(retryCount) >= int64(maxRetryCount) {
retryCountInt64 := parse.Number(retryCount)
if retryCountInt64 >= int64(maxRetryCount) {
msg := fmt.Sprintf("密码输入错误 %d 次,帐户锁定 %d 分钟", maxRetryCount, lockTime)
return retrykey, int64(maxRetryCount), time.Duration(lockTime) * time.Minute, errors.New(msg)
return retrykey, retryCountInt64, time.Duration(lockTime) * time.Minute, errors.New(msg)
}
return retrykey, int64(maxRetryCount), time.Duration(lockTime) * time.Minute, nil
return retrykey, retryCountInt64, time.Duration(lockTime) * time.Minute, nil
}
// RoleAndMenuPerms 角色和菜单数据权限