Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
9674ad06
Commit
9674ad06
authored
Jun 09, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加角色列表携带menuIds
parent
54581131
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
portal-manager/doc/api.md
portal-manager/doc/api.md
+1
-0
portal-manager/src/main/java/com/mortals/xhx/module/role/model/vo/RoleVo.java
...ain/java/com/mortals/xhx/module/role/model/vo/RoleVo.java
+3
-0
portal-manager/src/main/java/com/mortals/xhx/module/role/service/impl/RoleServiceImpl.java
...mortals/xhx/module/role/service/impl/RoleServiceImpl.java
+13
-0
No files found.
portal-manager/doc/api.md
View file @
9674ad06
...
...
@@ -1273,6 +1273,7 @@ data|object|数据对象
  createTime|Date|创建时间
  createUserId|Long|创建用户
  createUserName|String|创建用户名称
  childList|Arrays|菜单子列表
dict|object|字典对象
 linkType|object|字典属性对象,详见附录
 visible|object|字典属性对象,详见附录
...
...
portal-manager/src/main/java/com/mortals/xhx/module/role/model/vo/RoleVo.java
View file @
9674ad06
...
...
@@ -14,4 +14,7 @@ import java.util.List;
@Data
public
class
RoleVo
extends
BaseEntityLong
{
/** 菜单ID列表 */
private
List
<
Long
>
menuIdList
;
}
\ No newline at end of file
portal-manager/src/main/java/com/mortals/xhx/module/role/service/impl/RoleServiceImpl.java
View file @
9674ad06
...
...
@@ -21,6 +21,8 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.ObjectUtils
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* <p>Title: 角色信息</p>
...
...
@@ -39,6 +41,17 @@ public class RoleServiceImpl extends AbstractCRUDServiceImpl<RoleDao, RoleEntity
@Autowired
private
RoleUserService
roleUserService
;
@Override
protected
void
findAfter
(
RoleEntity
entity
,
Context
context
,
List
<
RoleEntity
>
list
)
throws
AppException
{
list
.
stream
().
forEach
(
item
->{
List
<
Long
>
menuIds
=
roleAuthService
.
find
(
new
RoleAuthQuery
().
roleId
(
item
.
getId
())).
stream
().
map
(
m
->
m
.
getMenuId
()).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
menuIds
)){
item
.
setMenuIdList
(
menuIds
);
}
});
super
.
findAfter
(
entity
,
context
,
list
);
}
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
RoleAuthQuery
roleAuthQuery
=
new
RoleAuthQuery
();
...
...
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