Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
tcm-system
Project
Project
Details
Activity
Releases
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
TCM
tcm-system
Commits
b9c15408
Commit
b9c15408
authored
Jul 13, 2019
by
zjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user/role/tright 7.13
parent
74531e65
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
RegisterServiceImpl.java
...gding/web/authority/service/impl/RegisterServiceImpl.java
+14
-6
No files found.
src/main/java/com/pangding/web/authority/service/impl/RegisterServiceImpl.java
View file @
b9c15408
...
@@ -432,7 +432,13 @@ public class RegisterServiceImpl implements RegisterService {
...
@@ -432,7 +432,13 @@ public class RegisterServiceImpl implements RegisterService {
AuthorityVo
authorityVo
=
authorityDaoImpl
.
load
(
authorityGetReqVo
,
AuthorityVo
.
class
);
AuthorityVo
authorityVo
=
authorityDaoImpl
.
load
(
authorityGetReqVo
,
AuthorityVo
.
class
);
if
(
null
==
authorityVo
.
getPid
()
||
authorityVo
.
getPid
().
isEmpty
()){
if
(
null
==
authorityVo
.
getPid
()
||
authorityVo
.
getPid
().
isEmpty
()){
levelOneList
.
add
(
authorityVo
);
levelOneList
.
add
(
authorityVo
);
authorityIdList
.
remove
(
i
);
authorityIdList
.
set
(
i
,
""
);
}
}
List
<
String
>
authorityIds
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
authorityIdList
.
size
();
i
++)
{
if
(!
""
.
equals
(
authorityIdList
.
get
(
i
))){
authorityIds
.
add
(
authorityIdList
.
get
(
i
));
}
}
}
}
Collections
.
sort
(
levelOneList
);
Collections
.
sort
(
levelOneList
);
...
@@ -443,7 +449,7 @@ public class RegisterServiceImpl implements RegisterService {
...
@@ -443,7 +449,7 @@ public class RegisterServiceImpl implements RegisterService {
for
(
AuthorityVo
authorityVo:
levelOneList
)
{
for
(
AuthorityVo
authorityVo:
levelOneList
)
{
AuthorityListByLevelResVo
resVo1
=
new
AuthorityListByLevelResVo
();
AuthorityListByLevelResVo
resVo1
=
new
AuthorityListByLevelResVo
();
ObjectHelper
.
writeWithFrom
(
resVo1
,
authorityVo
);
ObjectHelper
.
writeWithFrom
(
resVo1
,
authorityVo
);
List
<
AuthorityListByLevelResVo
>
childList
=
getChildList
(
authorityVo
,
authorityId
List
);
List
<
AuthorityListByLevelResVo
>
childList
=
getChildList
(
authorityVo
,
authorityId
s
);
resVo1
.
setChildList
(
childList
);
resVo1
.
setChildList
(
childList
);
authorityListByLevel
.
add
(
resVo1
);
authorityListByLevel
.
add
(
resVo1
);
}
}
...
@@ -456,17 +462,19 @@ public class RegisterServiceImpl implements RegisterService {
...
@@ -456,17 +462,19 @@ public class RegisterServiceImpl implements RegisterService {
return
resVo
;
return
resVo
;
}
}
private
List
<
AuthorityListByLevelResVo
>
getChildList
(
AuthorityVo
authorityVo
,
List
<
String
>
authorityId
List
){
private
List
<
AuthorityListByLevelResVo
>
getChildList
(
AuthorityVo
authorityVo
,
List
<
String
>
authorityId
s
){
List
<
AuthorityListByLevelResVo
>
resVoList
=
new
ArrayList
<>();
List
<
AuthorityListByLevelResVo
>
resVoList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
authorityId
List
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
authorityId
s
.
size
();
i
++)
{
AuthorityGetReqVo
authorityGetReqVo
=
new
AuthorityGetReqVo
();
AuthorityGetReqVo
authorityGetReqVo
=
new
AuthorityGetReqVo
();
authorityGetReqVo
.
setId
(
authorityId
List
.
get
(
i
));
authorityGetReqVo
.
setId
(
authorityId
s
.
get
(
i
));
AuthorityVo
authorityVo1
=
authorityDaoImpl
.
load
(
authorityGetReqVo
,
AuthorityVo
.
class
);
AuthorityVo
authorityVo1
=
authorityDaoImpl
.
load
(
authorityGetReqVo
,
AuthorityVo
.
class
);
if
(
authorityVo1
.
getPid
().
equals
(
authorityVo
.
getId
())){
if
(
authorityVo1
.
getPid
().
equals
(
authorityVo
.
getId
())){
List
<
String
>
authorityIdList
=
new
ArrayList
<>();
authorityIdList
.
addAll
(
authorityIds
);
authorityIdList
.
remove
(
i
);
authorityIdList
.
remove
(
i
);
AuthorityListByLevelResVo
resVo
=
new
AuthorityListByLevelResVo
();
AuthorityListByLevelResVo
resVo
=
new
AuthorityListByLevelResVo
();
ObjectHelper
.
writeWithFrom
(
resVo
,
authorityVo1
);
ObjectHelper
.
writeWithFrom
(
resVo
,
authorityVo1
);
if
(
authorityId
List
.
size
()>
0
){
if
(
authorityId
s
.
size
()>
0
){
resVo
.
setChildList
(
getChildList
(
authorityVo1
,
authorityIdList
));
resVo
.
setChildList
(
getChildList
(
authorityVo1
,
authorityIdList
));
}
}
resVoList
.
add
(
resVo
);
resVoList
.
add
(
resVo
);
...
...
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