Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-java
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
PeiZhen-Java
peizhen-java
Commits
dd90c196
Commit
dd90c196
authored
Sep 28, 2023
by
sdif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手机验证码登录
parent
98d8542c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
pz-admin/src/main/java/com/pz/web/controller/common/CaptchaController.java
+1
-1
pz-system/src/main/java/com/pz/system/service/SysLoginService.java
+1
-2
No files found.
pz-admin/src/main/java/com/pz/web/controller/common/CaptchaController.java
View file @
dd90c196
...
...
@@ -69,7 +69,7 @@ public class CaptchaController {
map
.
put
(
"code"
,
code
);
SmsBlend
smsBlend
=
SmsFactory
.
createSmsBlend
(
SupplierType
.
TENCENT
);
SmsResponse
smsResponse
=
smsBlend
.
sendMessage
(
phonenumber
,
templateId
,
map
);
if
(!
"O
K
"
.
equals
(
smsResponse
.
getCode
()))
{
if
(!
"O
k
"
.
equals
(
smsResponse
.
getCode
()))
{
log
.
error
(
"验证码短信发送异常 => {}"
,
smsResponse
);
return
R
.
fail
(
smsResponse
.
getMessage
());
}
...
...
pz-system/src/main/java/com/pz/system/service/SysLoginService.java
View file @
dd90c196
...
...
@@ -226,8 +226,7 @@ public class SysLoginService {
* 校验短信验证码
*/
private
boolean
validateSmsCode
(
String
phonenumber
,
String
smsCode
)
{
// String code = RedisUtils.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + phonenumber);
String
code
=
"1234"
;
String
code
=
RedisUtils
.
getCacheObject
(
CacheConstants
.
CAPTCHA_CODE_KEY
+
phonenumber
);
if
(
StringUtils
.
isBlank
(
code
))
{
recordLogininfor
(
phonenumber
,
Constants
.
LOGIN_FAIL
,
MessageUtils
.
message
(
"user.jcaptcha.expire"
));
throw
new
CaptchaExpireException
();
...
...
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