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
d1b68351
Commit
d1b68351
authored
Sep 12, 2017
by
Java—红包—徐 然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改语音上限
parent
01ddae6c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
SmsController.java
...uantgroup/xyqb/controller/internal/sms/SmsController.java
+5
-4
No files found.
src/main/java/cn/quantgroup/xyqb/controller/internal/sms/SmsController.java
View file @
d1b68351
...
...
@@ -45,9 +45,10 @@ public class SmsController implements IBaseController {
private
static
final
String
IMAGE_PHONE_COUNT
=
"image:phone"
;
private
static
final
String
IMAGE_DEVICEID_COUNT
=
"image:deviceId:"
;
private
static
final
Long
IP_MAX_PER_DAY
=
5000L
;
private
static
final
Long
PHONE_MAX_PER_DAY
=
20L
;
private
static
final
Long
DEVICE_MAX_PER_DAY
=
20L
;
private
static
final
Long
IP_MAX_PER_DAY
=
5000L
;
//ip上限
private
static
final
Long
PHONE_MAX_PER_DAY
=
20L
;
//手机号短信上限
private
static
final
Long
PHONE_VOICE_MAX_PER_DAY
=
5L
;
//手机号语音上限
private
static
final
Long
DEVICE_MAX_PER_DAY
=
20L
;
//设备每天上限
/**
* 短信验证码: for H5
* 使用 @FPLock 注解并加入自定义限制参数, 做针对手机号的发送次数限制
...
...
@@ -278,7 +279,7 @@ public class SmsController implements IBaseController {
String
verificationCountKey
=
Constants
.
REDIS_VOICE_CODE_COUNT
+
phoneNo
;
Long
getVerificationCount
=
redisTemplate
.
opsForHash
().
increment
(
verificationCountKey
,
usage
.
toString
(),
1
);
if
(
getVerificationCount
>
PHONE_MAX_PER_DAY
)
{
if
(
getVerificationCount
>
PHONE_
VOICE_
MAX_PER_DAY
)
{
return
JsonResult
.
buildErrorStateResult
(
"今天已获取5次语音验证码,请使用短信验证码或明天再试"
,
null
);
}
String
verificationIPCountKey
=
getIp
();
...
...
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