树级结构更新子节点使用replaceFirst

2.X
RuoYi 4 years ago committed by 疯狂的狮子li
parent a5ce3153d5
commit 897c669501

@ -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)
{

Loading…
Cancel
Save