Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
479929a6
authored
Sep 19, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fixbug:np
parent
7705fbfc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatOrgServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatRoleServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatOrgServiceImpl.java
View file @
479929a6
...
@@ -46,6 +46,7 @@ import java.util.HashSet;
...
@@ -46,6 +46,7 @@ import java.util.HashSet;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -436,9 +437,8 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
...
@@ -436,9 +437,8 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
return
new
HashSet
<>();
return
new
HashSet
<>();
}
}
List
<
PlatRole
>
roleList
=
platRoleService
.
listByIds
(
roleOrgList
.
stream
().
map
(
PlatRoleOrg:
:
getRoleId
).
collect
(
Collectors
.
toList
()));
List
<
PlatRole
>
roleList
=
platRoleService
.
listByIds
(
roleOrgList
.
stream
().
map
(
PlatRoleOrg:
:
getRoleId
).
collect
(
Collectors
.
toList
()));
return
roleList
.
stream
().
flatMap
(
vo
->
Stream
.
of
(
vo
.
getDataScope
()
.
split
(
","
))).
collect
(
Collectors
.
toSet
());
return
roleList
.
stream
().
flatMap
(
vo
->
Stream
.
of
(
Optional
.
ofNullable
(
vo
.
getDataScope
()).
orElse
(
new
String
())
.
split
(
","
))).
collect
(
Collectors
.
toSet
());
}
}
/**
/**
* 租户权限的组织树
* 租户权限的组织树
* @param orgList
* @param orgList
...
...
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatRoleServiceImpl.java
View file @
479929a6
...
@@ -423,7 +423,7 @@ implements PlatRoleService {
...
@@ -423,7 +423,7 @@ implements PlatRoleService {
*/
*/
@Override
@Override
public
List
<
PlatRole
>
belongTo
(
BaseIdDTO
baseIdDTO
)
{
public
List
<
PlatRole
>
belongTo
(
BaseIdDTO
baseIdDTO
)
{
PlatUserVO
userVO
=
PlatUserUtil
.
getUserVO
();
PlatUserVO
userVO
=
PlatUserUtil
.
getUserVO
CanNull
();
if
(
StringUtils
.
equals
(
userVO
.
getIsTenant
(),
CommonEnum
.
YES
.
getValue
())){
if
(
StringUtils
.
equals
(
userVO
.
getIsTenant
(),
CommonEnum
.
YES
.
getValue
())){
return
this
.
list
(
new
LambdaQueryWrapper
<
PlatRole
>().
orderByDesc
(
BaseEntity:
:
getUpdateDate
));
return
this
.
list
(
new
LambdaQueryWrapper
<
PlatRole
>().
orderByDesc
(
BaseEntity:
:
getUpdateDate
));
}
}
...
...
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