Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
be5c19b7
Commit
be5c19b7
authored
May 11, 2021
by
RuoYi
Browse files
树级结构更新子节点使用replaceFirst
parent
dd384e4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
View file @
be5c19b7
...
@@ -241,7 +241,7 @@ public class SysDeptServiceImpl implements ISysDeptService
...
@@ -241,7 +241,7 @@ public class SysDeptServiceImpl implements ISysDeptService
List
<
SysDept
>
children
=
deptMapper
.
selectChildrenDeptById
(
deptId
);
List
<
SysDept
>
children
=
deptMapper
.
selectChildrenDeptById
(
deptId
);
for
(
SysDept
child
:
children
)
for
(
SysDept
child
:
children
)
{
{
child
.
setAncestors
(
child
.
getAncestors
().
replace
(
oldAncestors
,
newAncestors
));
child
.
setAncestors
(
child
.
getAncestors
().
replace
First
(
oldAncestors
,
newAncestors
));
}
}
if
(
children
.
size
()
>
0
)
if
(
children
.
size
()
>
0
)
{
{
...
...
Write
Preview
Supports
Markdown
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