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
ec6bb1e7
Commit
ec6bb1e7
authored
Nov 14, 2025
by
刘红梅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UserUtils.setUserId(zhuanJiaUser);
parent
a96d2dba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/main/java/com/cnooc/expert/auth/service/impl/LoginServiceImpl.java
+5
-3
No files found.
src/main/java/com/cnooc/expert/auth/service/impl/LoginServiceImpl.java
View file @
ec6bb1e7
...
...
@@ -7,6 +7,7 @@ import com.cnooc.expert.common.exception.BusinessException;
import
com.cnooc.expert.common.exception.GlobalErrorCodeConstants
;
import
com.cnooc.expert.common.utils.JwtUtils
;
import
com.cnooc.expert.common.utils.Sm2Util
;
import
com.cnooc.expert.common.utils.UserUtils
;
import
com.cnooc.expert.common.utils.ValidUtils
;
import
com.cnooc.expert.external.expert.auth.service.LoginServicesClient
;
import
com.cnooc.expert.external.expert.model.response.ExpertInfoAppResp
;
...
...
@@ -193,7 +194,7 @@ public class LoginServiceImpl implements LoginService {
ZhuanJiaUser
zhuanJiaUser
=
convert2ZhuanjiaUser
(
expertInfoResp
);
redisTemplate
.
opsForValue
().
set
(
TokenConstants
.
LOGIN_USER_KEY_
+
expertInfoResp
.
getZhuanJiaGuid
(),
zhuanJiaUser
,
48
,
TimeUnit
.
HOURS
);
UserUtils
.
setUserId
(
zhuanJiaUser
);
String
token
=
JwtUtils
.
createToken
(
expertInfoResp
.
getZhuanJiaGuid
(),
uuidKey
);
//6.返回token
return
token
;
...
...
@@ -222,10 +223,11 @@ public class LoginServiceImpl implements LoginService {
}
//3.生成相应的uuid作为redis的key
String
uuidKey
=
UUID
.
randomUUID
().
toString
();
//expertInfoResp = new ExpertInfoResp();
//expertInfoResp.setZhuanJiaGuid("1234");
ZhuanJiaUser
zhuanJiaUser
=
convert2ZhuanjiaUser
(
expertInfoResp
);
redisTemplate
.
opsForValue
().
set
(
TokenConstants
.
LOGIN_USER_KEY_
+
expertInfoResp
.
getZhuanJiaGuid
(),
zhuanJiaUser
,
48
,
TimeUnit
.
HOURS
);
UserUtils
.
setUserId
(
zhuanJiaUser
);
String
token
=
JwtUtils
.
createToken
(
expertInfoResp
.
getZhuanJiaGuid
(),
uuidKey
);
return
token
;
...
...
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