Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
Project
Project
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
hubin
long-tern-care-service
Commits
40eb8840
Commit
40eb8840
authored
Feb 14, 2023
by
董天德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户信息新增机构权限
parent
68dd0cdd
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
0 deletions
+14
-0
AuthorizationServerConfiguration.java
.../ltc/gateway/config/AuthorizationServerConfiguration.java
+2
-0
SystemUser.java
.../java/com/hungraim/ltc/pojo/entity/system/SystemUser.java
+2
-0
ReqUserInfo.java
...ain/java/com/hungraim/ltc/pojo/vo/system/ReqUserInfo.java
+2
-0
UserLoginInfoVO.java
...java/com/hungraim/ltc/pojo/vo/system/UserLoginInfoVO.java
+4
-0
UserController.java
...va/com/hungraim/ltc/system/controller/UserController.java
+4
-0
No files found.
auth-service/src/main/java/com/hungraim/ltc/gateway/config/AuthorizationServerConfiguration.java
View file @
40eb8840
...
...
@@ -160,6 +160,8 @@ public class AuthorizationServerConfiguration extends AuthorizationServerConfigu
map
.
put
(
"avatar"
,
user
.
getAvatar
());
map
.
put
(
"userId"
,
user
.
getUserId
());
map
.
put
(
"account"
,
user
.
getUsername
());
map
.
put
(
"organId"
,
user
.
getOrganId
());
map
.
put
(
"srvOrganId"
,
user
.
getSrvOrganId
());
((
DefaultOAuth2AccessToken
)
accessToken
).
setAdditionalInformation
(
map
);
return
accessToken
;
};
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/system/SystemUser.java
View file @
40eb8840
...
...
@@ -27,5 +27,7 @@ public class SystemUser {
private
Integer
userStatus
;
private
Date
createdTime
;
private
Date
updatedTime
;
private
Long
organId
;
private
Long
srvOrganId
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/system/ReqUserInfo.java
View file @
40eb8840
...
...
@@ -20,5 +20,7 @@ public class ReqUserInfo {
private
String
marketerCode
;
private
List
<
Long
>
roleIds
;
private
Long
organId
;
private
Long
srvOrganId
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/system/UserLoginInfoVO.java
View file @
40eb8840
...
...
@@ -23,6 +23,8 @@ public class UserLoginInfoVO implements UserDetails {
private
final
Long
userId
;
private
String
avatar
;
private
final
Boolean
enable
;
private
Long
organId
;
private
Long
srvOrganId
;
public
UserLoginInfoVO
(
SystemUser
user
)
{
this
.
username
=
user
.
getAccount
();
...
...
@@ -30,6 +32,8 @@ public class UserLoginInfoVO implements UserDetails {
this
.
name
=
user
.
getRealName
();
this
.
userId
=
user
.
getUserId
();
this
.
enable
=
user
.
getUserStatus
()
==
1
;
this
.
organId
=
user
.
getOrganId
();
this
.
srvOrganId
=
user
.
getSrvOrganId
();
}
public
void
setAuthorities
(
List
<
Long
>
roles
)
{
...
...
system/system-admin-service/src/main/java/com/hungraim/ltc/system/controller/UserController.java
View file @
40eb8840
...
...
@@ -110,6 +110,8 @@ public class UserController {
user
.
setRealName
(
reqUserInfo
.
getName
());
user
.
setUserStatus
(
reqUserInfo
.
getEnable
());
user
.
setCreatedTime
(
new
Date
());
user
.
setOrganId
(
reqUserInfo
.
getOrganId
());
user
.
setSrvOrganId
(
reqUserInfo
.
getSrvOrganId
());
userInfoService
.
save
(
user
);
Long
userId
=
user
.
getUserId
();
//初始化权限
...
...
@@ -192,6 +194,8 @@ public class UserController {
userInfo
.
setEnable
(
user
.
getUserStatus
());
userInfo
.
setAvatar
(
user
.
getAvatar
());
userInfo
.
setGender
(
Gender
.
MAN
.
getCode
().
equals
(
user
.
getGender
())
?
Gender
.
MAN
.
getDesc
()
:
Gender
.
WOMAN
.
getDesc
());
userInfo
.
setOrganId
(
user
.
getOrganId
());
userInfo
.
setSrvOrganId
(
user
.
getSrvOrganId
());
return
userInfo
;
}).
collect
(
Collectors
.
toList
());
return
Result
.
success
(
resUsers
);
...
...
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