Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
cloud-backend
Commits
e549272d
Commit
e549272d
authored
Jul 10, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.0
parent
cbadd4c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
user-server/src/main/java/com/zq/user/controller/app/UserController.java
+8
-2
No files found.
user-server/src/main/java/com/zq/user/controller/app/UserController.java
View file @
e549272d
...
...
@@ -26,8 +26,14 @@ public class UserController {
private
final
UserService
userService
;
// 30秒只能访问一次
@Limit
(
limitType
=
LimitType
.
PARAM
,
keyParamIndex
=
0
,
period
=
30
,
count
=
1
,
name
=
"发送验证码"
,
errMsg
=
"请稍后再试!"
)
/**
* 发送手机验证码
* 使用第一个参数值作为限流key, 30秒只能访问一次
*
* @param phone
* @return
*/
@Limit
(
limitType
=
LimitType
.
PARAM
,
keyParamIndex
=
0
,
period
=
30
,
count
=
1
,
name
=
"发送手机验证码"
,
errMsg
=
"请稍后再试!"
)
@ApiOperation
(
"发送验证码"
)
@GetMapping
(
value
=
"/sendCode"
)
public
ResultVo
sendCode
(
String
phone
)
{
...
...
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