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
fa45bca3
Commit
fa45bca3
authored
Nov 15, 2025
by
kenzo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.gdatac.com/sundelong/cnooc_zydeepen-cggl_expert-manage-miniapp
merge
parents
57ee05c8
8245c32f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
src/main/java/com/cnooc/expert/auth/service/impl/LoginServiceImpl.java
+17
-7
src/main/java/com/cnooc/expert/system/operatelog/aspect/LogAspectj.java
+1
-1
No files found.
src/main/java/com/cnooc/expert/auth/service/impl/LoginServiceImpl.java
View file @
fa45bca3
...
...
@@ -118,15 +118,19 @@ public class LoginServiceImpl implements LoginService {
ValidUtils
.
isText
(
loginVO
.
getPhoneCode
(),
"请输入验证码"
);
ValidUtils
.
isTrue
(
Validator
.
isMobile
(
loginVO
.
getPhoneNumber
()),
"请输入正确格式的手机号"
);
ValidUtils
.
isText
(
loginVO
.
getPassword
(),
"请输入密码"
);
ValidUtils
.
isValidPassword
(
loginVO
.
getPassword
(),
GlobalErrorCodeConstants
.
PARAM_PASSWORD_FORMAT_ERROR
);
String
pwd
=
Sm2Util
.
decrypt
(
loginVO
.
getPassword
());
ValidUtils
.
isValidPassword
(
pwd
,
GlobalErrorCodeConstants
.
PARAM_PASSWORD_FORMAT_ERROR
);
//1.根据手机号去库中查询是否存在
ExpertInfoResp
expertInfoResp
=
loginServicesClient
.
querySingleByShengFenZhengOrMobile
(
loginVO
.
getPhoneNumber
(),
null
);
expertInfoResp
=
new
ExpertInfoResp
();
expertInfoResp
.
setZhuanJiaGuid
(
"1234"
);
expertInfoResp
.
setZhuanJiaName
(
"张三"
);
if
(
expertInfoResp
==
null
){
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
USER_NOT_EXISTS
.
getCode
(),
GlobalErrorCodeConstants
.
USER_NOT_EXISTS
.
getMsg
());
}
//2.判断密码是否存在
ExpertInfoAppResp
expertInfoAppResp
=
loginServicesClient
.
getZhuanJiaInfoAppById
(
expertInfoResp
.
getZhuanJiaGuid
());
String
pwd
=
Sm2Util
.
decrypt
(
loginVO
.
getPassword
());
if
(
expertInfoAppResp
==
null
){
//没有记录的话就是新建记录
loginServicesClient
.
saveZhuanJiaInfoApp
(
null
,
passwordEncoder
.
encode
(
pwd
));
...
...
@@ -166,8 +170,12 @@ public class LoginServiceImpl implements LoginService {
ValidUtils
.
isText
(
loginVO
.
getIdNumber
(),
"请输入身份证号"
);
ValidUtils
.
isText
(
loginVO
.
getPassword
(),
"请输入密码"
);
ValidUtils
.
isTrue
(
IdcardUtil
.
isValidCard
(
loginVO
.
getIdNumber
()),
"请输入正确的身份证号"
);
ValidUtils
.
isValidPassword
(
loginVO
.
getPassword
(),
GlobalErrorCodeConstants
.
PARAM_PASSWORD_FORMAT_ERROR
);
String
pwd
=
Sm2Util
.
decrypt
(
loginVO
.
getPassword
());
ValidUtils
.
isValidPassword
(
pwd
,
GlobalErrorCodeConstants
.
PARAM_PASSWORD_FORMAT_ERROR
);
ExpertInfoResp
expertInfoResp
=
loginServicesClient
.
querySingleByShengFenZhengOrMobile
(
null
,
loginVO
.
getIdNumber
());
expertInfoResp
=
new
ExpertInfoResp
();
expertInfoResp
.
setZhuanJiaGuid
(
"1234"
);
expertInfoResp
.
setZhuanJiaName
(
"张三"
);
if
(
expertInfoResp
==
null
){
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
USER_NOT_EXISTS
.
getCode
(),
GlobalErrorCodeConstants
.
USER_NOT_EXISTS
.
getMsg
());
}
...
...
@@ -179,6 +187,9 @@ public class LoginServiceImpl implements LoginService {
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
USER_LOCKED
.
getCode
(),
GlobalErrorCodeConstants
.
USER_LOCKED
.
getMsg
(),
"user_login"
,
errorData
);
}
ExpertInfoAppResp
expertInfoAppResp
=
loginServicesClient
.
getZhuanJiaInfoAppById
(
expertInfoResp
.
getZhuanJiaGuid
());
expertInfoAppResp
=
new
ExpertInfoAppResp
();
expertInfoAppResp
.
setPassword
(
passwordEncoder
.
encode
(
pwd
));
expertInfoAppResp
.
setBaseGuid
(
"1234"
);
if
(
expertInfoAppResp
==
null
){
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
PASSWORD_NOT_EXIST
.
getCode
(),
GlobalErrorCodeConstants
.
PASSWORD_NOT_EXIST
.
getMsg
());
}
...
...
@@ -189,8 +200,6 @@ public class LoginServiceImpl implements LoginService {
}*/
//1.需要去库中查询,是否存在
//2.存在校验密码
//解密
String
pwd
=
Sm2Util
.
decrypt
(
loginVO
.
getPassword
());
boolean
flag
=
passwordEncoder
.
matches
(
pwd
,
expertInfoAppResp
.
getPassword
());
if
(!
flag
)
{
// 登录日志
...
...
@@ -222,11 +231,12 @@ public class LoginServiceImpl implements LoginService {
ValidUtils
.
isTrue
(
Validator
.
isMobile
(
loginVO
.
getPhoneNumber
()),
"请输入正确格式的手机号"
);
//1.根据手机号去库中查询是否存在
ExpertInfoResp
expertInfoResp
=
loginServicesClient
.
querySingleByShengFenZhengOrMobile
(
loginVO
.
getPhoneNumber
(),
null
);
expertInfoResp
=
new
ExpertInfoResp
();
expertInfoResp
.
setZhuanJiaGuid
(
"1234"
);
expertInfoResp
.
setZhuanJiaName
(
"张三"
);
if
(
expertInfoResp
==
null
){
throw
new
BusinessException
(
GlobalErrorCodeConstants
.
USER_NOT_EXISTS
.
getCode
(),
GlobalErrorCodeConstants
.
USER_NOT_EXISTS
.
getMsg
());
}
//expertInfoResp = new ExpertInfoResp();
//expertInfoResp.setZhuanJiaGuid("1234");
boolean
isAccountLocked
=
accountLockService
.
isAccountLocked
(
expertInfoResp
.
getZhuanJiaGuid
());
if
(
isAccountLocked
){
//如果账号锁定了,返回错误信息
...
...
src/main/java/com/cnooc/expert/system/operatelog/aspect/LogAspectj.java
View file @
fa45bca3
...
...
@@ -167,7 +167,7 @@ public class LogAspectj {
//将数据发送到kafka,这里需要加代码逻辑
// Kafka默认异步发送(Topic、key需要提供,如果有key的话这样写:kafkaProducerUtil.sendMessage("test-topic(topic值)", "key的值",logBody); )
kafkaProducerUtil
.
sendMessage
(
"test-topic"
,
logBody
);
//
kafkaProducerUtil.sendMessage("test-topic", logBody);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
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