mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2026-05-06 01:01:10 +08:00
树级结构更新子节点使用replaceFirst
This commit is contained in:
+1
-1
@@ -241,7 +241,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
List<SysDept> children = deptMapper.selectChildrenDeptById(deptId);
|
||||
for (SysDept child : children)
|
||||
{
|
||||
child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors));
|
||||
child.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors));
|
||||
}
|
||||
if (children.size() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user