Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
Overview
Overview
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
base_platform_enterprise
gic-platform-auth
Commits
09ecacb7
Commit
09ecacb7
authored
Sep 20, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑权限项接口修复:编辑的时候不设置排序值
parent
4764f14e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
MenuApiServiceImpl.java
...a/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
+15
-7
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/MenuApiServiceImpl.java
View file @
09ecacb7
...
...
@@ -432,16 +432,24 @@ public class MenuApiServiceImpl implements MenuApiService {
menuDTO
.
setMenuType
(
MenuTypeEnum
.
PAGE
.
getCode
());
}
private
void
setNormalFieldValue
(
MenuDTO
menuDTO
,
TabSysMenu
record
)
{
/**
* 新增子页面、操作项、权限项的时候设置常规字段值
* @param menuDTO
* @param parent 父级页面
*/
private
void
setNormalFieldValue
(
MenuDTO
menuDTO
,
TabSysMenu
parent
)
{
//project
menuDTO
.
setProject
(
record
.
getProject
());
menuDTO
.
setProject
(
parent
.
getProject
());
//sort
int
maxSort
=
menuService
.
getMaxSortByParentId
(
menuDTO
.
getParentId
(),
menuDTO
.
getProject
());
menuDTO
.
setSort
(
maxSort
+
1
);
//level
menuDTO
.
setLevel
(
record
.
getLevel
()
+
1
);
if
(
menuDTO
.
getMenuId
()
==
null
)
{
//新增的时候需要设置sort和level。编辑的时候不需要,因为编辑的时候不能再次选择新的父级页面,所以层级是不变的。
int
maxSort
=
menuService
.
getMaxSortByParentId
(
menuDTO
.
getParentId
(),
menuDTO
.
getProject
());
menuDTO
.
setSort
(
maxSort
+
1
);
//level
menuDTO
.
setLevel
(
parent
.
getLevel
()
+
1
);
}
//父级code
menuDTO
.
setParentCode
(
record
.
getMenuCode
());
menuDTO
.
setParentCode
(
parent
.
getMenuCode
());
}
/**
...
...
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