Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cnooc_zydeepen-cggl_expert-manage-miniapp
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙德龙
cnooc_zydeepen-cggl_expert-manage-miniapp
Commits
3bc7fe88
Commit
3bc7fe88
authored
Nov 15, 2025
by
刘红梅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉图形验证码部分
parent
2704d43f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
src/main/java/com/cnooc/expert/auth/service/impl/LoginServiceImpl.java
+6
-7
No files found.
src/main/java/com/cnooc/expert/auth/service/impl/LoginServiceImpl.java
View file @
3bc7fe88
...
...
@@ -98,17 +98,17 @@ public class LoginServiceImpl implements LoginService {
//待确认,验证码下发是调用第三方平台吗
//return Result.success("验证码已发送");
boolean
flag
=
sysCaptchaService
.
validate
(
vo
.
getKey
(),
vo
.
getCaptcha
());
/*
boolean flag = sysCaptchaService.validate(vo.getKey(), vo.getCaptcha());
if(!flag){
throw new BusinessException(GlobalErrorCodeConstants.CAPTCHA_EXPIRED.getCode(),GlobalErrorCodeConstants.CAPTCHA_EXPIRED.getMsg());
}
else
{
}else{
*/
boolean
smsfalg
=
smsService
.
sendSmsCode
(
vo
.
getPhoneNumber
());
if
(!
smsfalg
)
{
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
SEND_SMS_ERROR
.
getCode
(),
GlobalErrorCodeConstants
.
SEND_SMS_ERROR
.
getMsg
());
}
else
{
return
"短信验证码发送成功"
;
}
}
//
}
}
@Override
...
...
@@ -183,16 +183,15 @@ public class LoginServiceImpl implements LoginService {
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
PASSWORD_NOT_EXIST
.
getCode
(),
GlobalErrorCodeConstants
.
PASSWORD_NOT_EXIST
.
getMsg
());
}
// 验证码效验
boolean
flag
=
sysCaptchaService
.
validate
(
loginVO
.
getKey
(),
loginVO
.
getCaptcha
());
/*
boolean flag = sysCaptchaService.validate(loginVO.getKey(), loginVO.getCaptcha());
if (!flag) {
// 保存登录日志
throw new BusinessException(GlobalErrorCodeConstants.CAPTCHA_EXPIRED.getCode(),GlobalErrorCodeConstants.CAPTCHA_EXPIRED.getMsg());
}
}
*/
//1.需要去库中查询,是否存在
//2.存在校验密码
//解密
String
pwd
=
Sm2Util
.
decrypt
(
loginVO
.
getPassword
());
flag
=
passwordEncoder
.
matches
(
pwd
,
expertInfoAppResp
.
getPassword
());
boolean
flag
=
passwordEncoder
.
matches
(
pwd
,
expertInfoAppResp
.
getPassword
());
if
(!
flag
)
{
// 登录日志
accountLockService
.
handleLoginFailure
(
expertInfoResp
.
getZhuanJiaGuid
());
...
...
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