Browse Source

!289 [bug修复]树级结构更新子节点的anecstors字段时应把replace替换为replaceFirst

Merge pull request !289 from zhengxl5566/master
pull/289/MERGE
若依 4 years ago
parent
commit
4efad1cd1b
  1. 2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java

2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java

@ -259,7 +259,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