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
301258a4
authored
Sep 26, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
e1bdb089
a4a753c7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatOrgServiceImpl.java
server-service/src/main/resources/mappers/PlatBedMapper.xml
server-service/src/main/java/com/makeit/service/platform/auth/impl/PlatOrgServiceImpl.java
View file @
301258a4
...
@@ -12,7 +12,6 @@ import com.makeit.common.page.PageVO;
...
@@ -12,7 +12,6 @@ import com.makeit.common.page.PageVO;
import
com.makeit.dto.platform.auth.PlatOrgSplitDTO
;
import
com.makeit.dto.platform.auth.PlatOrgSplitDTO
;
import
com.makeit.entity.platform.auth.PlatOrg
;
import
com.makeit.entity.platform.auth.PlatOrg
;
import
com.makeit.entity.platform.auth.PlatRole
;
import
com.makeit.entity.platform.auth.PlatRole
;
import
com.makeit.entity.platform.auth.PlatRoleOrg
;
import
com.makeit.entity.platform.auth.PlatUserRole
;
import
com.makeit.entity.platform.auth.PlatUserRole
;
import
com.makeit.entity.platform.space.PlatSpace
;
import
com.makeit.entity.platform.space.PlatSpace
;
import
com.makeit.enums.CodeMessageEnum
;
import
com.makeit.enums.CodeMessageEnum
;
...
@@ -436,12 +435,12 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
...
@@ -436,12 +435,12 @@ public class PlatOrgServiceImpl extends ServiceImpl<PlatOrgMapper, PlatOrg>
if
(
CollectionUtils
.
isEmpty
(
userRoleList
))
{
if
(
CollectionUtils
.
isEmpty
(
userRoleList
))
{
return
new
HashSet
<>();
return
new
HashSet
<>();
}
}
List
<
PlatRoleOrg
>
roleOrgList
=
platRoleOrgService
.
getByRoleIds
(
userRoleList
.
stream
().
map
(
PlatUserRole:
:
getRoleId
).
collect
(
Collectors
.
toSet
()));
//
List<PlatRoleOrg> roleOrgList = platRoleOrgService.getByRoleIds(userRoleList.stream().map(PlatUserRole::getRoleId).collect(Collectors.toSet()));
if
(
CollectionUtils
.
isEmpty
(
roleOrgList
))
{
//
if (CollectionUtils.isEmpty(roleOrgList)) {
return
new
HashSet
<>();
//
return new HashSet<>();
}
//
}
//return roleOrgList.stream().map(PlatRoleOrg::getOrgId).collect(Collectors.toSet());
//return roleOrgList.stream().map(PlatRoleOrg::getOrgId).collect(Collectors.toSet());
List
<
PlatRole
>
roleList
=
platRoleService
.
listByIds
(
roleOrgList
.
stream
().
map
(
PlatRoleOrg
:
:
getRoleId
).
collect
(
Collectors
.
toList
()));
List
<
PlatRole
>
roleList
=
platRoleService
.
listByIds
(
userRoleList
.
stream
().
map
(
PlatUserRole
:
:
getRoleId
).
collect
(
Collectors
.
toList
()));
return
roleList
.
stream
().
flatMap
(
vo
->
Stream
.
of
(
Optional
.
ofNullable
(
vo
.
getDataScope
()).
orElse
(
new
String
())
.
split
(
","
))).
collect
(
Collectors
.
toSet
());
return
roleList
.
stream
().
flatMap
(
vo
->
Stream
.
of
(
Optional
.
ofNullable
(
vo
.
getDataScope
()).
orElse
(
new
String
())
.
split
(
","
))).
collect
(
Collectors
.
toSet
());
}
}
/**
/**
...
...
server-service/src/main/resources/mappers/PlatBedMapper.xml
View file @
301258a4
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</foreach>
</foreach>
</if>
</if>
<if
test=
"orgType != null and orgType != ''"
>
<if
test=
"orgType != null and orgType != ''"
>
AND ps.
typ
e = #{orgType}
AND ps.
attribut
e = #{orgType}
</if>
</if>
</where>
</where>
</select>
</select>
...
...
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