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
6155d943
Commit
6155d943
authored
Nov 14, 2025
by
刘红梅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改异常2
parent
d895b93e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
src/main/java/com/cnooc/expert/auth/service/impl/LoginServiceImpl.java
+4
-4
src/main/java/com/cnooc/expert/common/exception/GlobalErrorCodeConstants.java
+1
-0
No files found.
src/main/java/com/cnooc/expert/auth/service/impl/LoginServiceImpl.java
View file @
6155d943
...
...
@@ -159,18 +159,18 @@ public class LoginServiceImpl implements LoginService {
ValidUtils
.
isTrue
(
IdcardUtil
.
isValidCard
(
loginVO
.
getIdNumber
()),
"请输入正确的身份证号"
);
ExpertInfoResp
expertInfoResp
=
loginServicesClient
.
querySingleByShengFenZhengOrMobile
(
null
,
loginVO
.
getIdNumber
());
if
(
expertInfoResp
==
null
){
return
"用户信息不存在"
;
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
USER_NOT_EXISTS
.
getCode
(),
GlobalErrorCodeConstants
.
USER_NOT_EXISTS
.
getMsg
())
;
}
ExpertInfoAppResp
expertInfoAppResp
=
loginServicesClient
.
getZhuanJiaInfoAppById
(
expertInfoResp
.
getZhuanJiaGuid
());
if
(
expertInfoAppResp
==
null
){
return
"该用户还没有设置密码"
;
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
PASSWORD_NOT_EXIST
.
getCode
(),
GlobalErrorCodeConstants
.
PASSWORD_NOT_EXIST
.
getMsg
())
;
}
// 验证码效验
boolean
flag
=
sysCaptchaService
.
validate
(
loginVO
.
getKey
(),
loginVO
.
getCaptcha
());
if
(!
flag
)
{
// 保存登录日志
//sysLogLoginService.save(login.getUsername(), Constant.FAIL, LoginOperationEnum.CAPTCHA_FAIL.getValue());
throw
new
BusinessException
(
"图形验证码错误"
);
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
CAPTCHA_EXPIRED
.
getCode
(),
GlobalErrorCodeConstants
.
CAPTCHA_EXPIRED
.
getMsg
()
);
}
//1.需要去库中查询,是否存在
//2.存在校验密码
...
...
@@ -180,7 +180,7 @@ public class LoginServiceImpl implements LoginService {
if
(!
flag
)
{
// 登录日志
//sysLogLoginService.savePortal(login.getAccountName(), Constant.FAIL, LoginOperationEnum.ACCOUNT_FAIL.getValue(), 1);
throw
new
BusinessException
(
"密码错误"
);
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
PASSWORD_ERROR
.
getCode
(),
GlobalErrorCodeConstants
.
PASSWORD_ERROR
.
getMsg
()
);
}
//3.生成相应的uuid作为redis的key
...
...
src/main/java/com/cnooc/expert/common/exception/GlobalErrorCodeConstants.java
View file @
6155d943
...
...
@@ -24,6 +24,7 @@ public interface GlobalErrorCodeConstants {
ErrorCode
USER_NOT_EXISTS
=
new
ErrorCode
(
2002
,
"用户不存在"
);
ErrorCode
PASSWORD_ERROR
=
new
ErrorCode
(
2003
,
"密码错误"
);
ErrorCode
USER_DISABLED
=
new
ErrorCode
(
2004
,
"用户已被禁用"
);
ErrorCode
PASSWORD_NOT_EXIST
=
new
ErrorCode
(
2005
,
"密码不存在,请先重置密码"
);
// ========== 参数校验错误 (3000-3999) ==========
ErrorCode
PARAM_REQUIRED
=
new
ErrorCode
(
3001
,
"必填字段不能为空"
);
...
...
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