From be5c19b764e85d19389935861c4c7794f0222494 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 11 May 2021 14:25:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=91=E7=BA=A7=E7=BB=93=E6=9E=84=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=AD=90=E8=8A=82=E7=82=B9=E4=BD=BF=E7=94=A8replaceFi?= =?UTF-8?q?rst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 35f627696..aa69c4751 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -241,7 +241,7 @@ public class SysDeptServiceImpl implements ISysDeptService List 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) {