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
dbbf87b1
authored
Sep 07, 2023
by
李小龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
菜单接口包含按钮数据
parent
d041bf87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
server-service/src/main/java/com/makeit/service/saas/impl/SaasUserServiceImpl.java
server-service/src/main/java/com/makeit/service/saas/impl/SaasUserServiceImpl.java
View file @
dbbf87b1
...
...
@@ -328,7 +328,12 @@ implements SaasUserService{
private
void
fillMenuList
(
List
<
SaasMenu
>
menuList
,
SaasUserLoginVO
userLoginVO
)
{
List
<
SaasMenu
>
buttonList
=
StreamUtil
.
filter
(
menuList
,
e
->
SysEnum
.
MenuTypeEnum
.
MENU
.
getValue
().
equals
(
e
.
getCategory
())
||
SysEnum
.
MenuTypeEnum
.
BUTTON
.
getValue
().
equals
(
e
.
getCategory
()));
List
<
SaasMenu
>
nonButtonList
=
StreamUtil
.
filter
(
menuList
,
e
->
SysEnum
.
MenuTypeEnum
.
CATALOGUE
.
getValue
().
equals
(
e
.
getCategory
())
||
SysEnum
.
MenuTypeEnum
.
MENU
.
getValue
().
equals
(
e
.
getCategory
()));
List
<
SaasMenu
>
nonButtonList
=
StreamUtil
.
filter
(
menuList
,
e
->
SysEnum
.
MenuTypeEnum
.
CATALOGUE
.
getValue
().
equals
(
e
.
getCategory
())
||
SysEnum
.
MenuTypeEnum
.
MENU
.
getValue
().
equals
(
e
.
getCategory
())
||
SysEnum
.
MenuTypeEnum
.
BUTTON
.
getValue
().
equals
(
e
.
getCategory
())
);
List
<
SaasMenuDTOVO
>
menuVOList
=
saasMenuService
.
tree
(
BeanDtoVoUtils
.
listVo
(
nonButtonList
,
SaasMenuDTOVO
.
class
));
userLoginVO
.
setButtonList
(
BeanDtoVoUtils
.
listVo
(
buttonList
,
SaasMenuDTOVO
.
class
));
...
...
@@ -345,15 +350,15 @@ implements SaasUserService{
}
private
void
setRoleMenuToRedis
(
SaasUserLoginVO
userLoginVO
)
{
SaasUserRoleMenuRedisVO
plat
UserRoleMenuRedisVO
=
new
SaasUserRoleMenuRedisVO
();
plat
UserRoleMenuRedisVO
.
setId
(
userLoginVO
.
getId
());
SaasUserRoleMenuRedisVO
saas
UserRoleMenuRedisVO
=
new
SaasUserRoleMenuRedisVO
();
saas
UserRoleMenuRedisVO
.
setId
(
userLoginVO
.
getId
());
if
(
userLoginVO
.
getRoleList
()
!=
null
)
{
plat
UserRoleMenuRedisVO
.
setRoleCodeList
(
StreamUtil
.
map
(
userLoginVO
.
getRoleList
(),
SaasRoleDTOVO:
:
getCode
));
saas
UserRoleMenuRedisVO
.
setRoleCodeList
(
StreamUtil
.
map
(
userLoginVO
.
getRoleList
(),
SaasRoleDTOVO:
:
getCode
));
}
if
(
userLoginVO
.
getButtonList
()
!=
null
)
{
plat
UserRoleMenuRedisVO
.
setButtonCodeList
(
StreamUtil
.
map
(
userLoginVO
.
getButtonList
(),
SaasMenuDTOVO:
:
getCode
));
saas
UserRoleMenuRedisVO
.
setButtonCodeList
(
StreamUtil
.
map
(
userLoginVO
.
getButtonList
(),
SaasMenuDTOVO:
:
getCode
));
}
TokenUtil
.
platLoginRoleMenu
(
plat
UserRoleMenuRedisVO
);
TokenUtil
.
platLoginRoleMenu
(
saas
UserRoleMenuRedisVO
);
}
...
...
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