diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java index bf78bd297..0536257da 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/DeptServiceImpl.java @@ -149,7 +149,8 @@ public class DeptServiceImpl implements DeptService { }); deptMapper.updateBatch(deptDOS, deptDOS.size()); deptDO.setName(reqVO.getName()); - deptDO.setParentOrganizationName(reqVO.getName()); + DeptDO parentDeptDO = deptMapper.selectById(deptDO.getParentId()); + deptDO.setParentOrganizationName(parentDeptDO.getParentOrganizationName() + ">" + reqVO.getName()); deptMapper.updateById(deptDO); // 发送刷新消息 deptProducer.sendDeptRefreshMessage();