Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
1e265a3d
Commit
1e265a3d
authored
Nov 26, 2020
by
董建华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
先不上登录错误5次的
parent
a9a3a240
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
CaptchaFiniteValidateAdvisor.java
...oup/xyqb/aspect/captcha/CaptchaFiniteValidateAdvisor.java
+17
-16
No files found.
src/main/java/cn/quantgroup/xyqb/aspect/captcha/CaptchaFiniteValidateAdvisor.java
View file @
1e265a3d
...
@@ -93,23 +93,24 @@ public class CaptchaFiniteValidateAdvisor {
...
@@ -93,23 +93,24 @@ public class CaptchaFiniteValidateAdvisor {
if
(
countErrorByPhone
>
Constants
.
Image_Need_Count
)
{
if
(
countErrorByPhone
>
Constants
.
Image_Need_Count
)
{
/**
/**
* 输入密码错误超过一定次数限制登陆
* 输入密码错误超过一定次数限制登陆
* 先不上这个登录5次的
*/
*/
if
(
countErrorByPhone
>=
Constants
.
PASSWORD_ERROR_LOCK_COUNT
)
{
//
if (countErrorByPhone >= Constants.PASSWORD_ERROR_LOCK_COUNT) {
//
String
lock_key
=
Constants
.
PASSWORD_LOCK_PRE
.
concat
(
phoneNo
);
//
String lock_key = Constants.PASSWORD_LOCK_PRE.concat(phoneNo);
//
Long
expire
=
redisTemplate
.
opsForValue
().
getOperations
().
getExpire
(
lock_key
);
//
Long expire = redisTemplate.opsForValue().getOperations().getExpire(lock_key);
/**
//
/**
* 查看锁的剩余时间不存在说明已经解锁
//
* 查看锁的剩余时间不存在说明已经解锁
*/
//
*/
if
(
null
!=
expire
&&
expire
>
0L
)
{
//
if (null != expire && expire > 0L) {
/**
//
/**
* 获取到的时间是秒 转化为分 大概转一下吧不要太精确
//
* 获取到的时间是秒 转化为分 大概转一下吧不要太精确
*/
//
*/
expire
=
expire
>
60L
?
expire
/
60
:
1L
;
//
expire = expire > 60L ? expire / 60 : 1L;
return
JsonResult
.
buildErrorStateResult
(
String
.
format
(
ALERT_TEMP
,
expire
),
null
);
//
return JsonResult.buildErrorStateResult(String.format(ALERT_TEMP, expire ), null);
}
//
}
}
//
}
String
registerFrom
=
Optional
.
ofNullable
(
request
.
getParameter
(
"registerFrom"
)).
orElse
(
""
);
String
registerFrom
=
Optional
.
ofNullable
(
request
.
getParameter
(
"registerFrom"
)).
orElse
(
""
);
String
captchaId
=
Optional
.
ofNullable
(
request
.
getParameter
(
Constants
.
QG_CAPTCHA_ID
)).
orElse
(
""
);
String
captchaId
=
Optional
.
ofNullable
(
request
.
getParameter
(
Constants
.
QG_CAPTCHA_ID
)).
orElse
(
""
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment