疯狂的狮子Li
2024-06-28 a4fe077a231ed2ae0094af0fc6fa0735b764c862
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java
@@ -135,11 +135,8 @@
            return null;
        }
        SysDeptVo parentDept = baseMapper.selectVoOne(new LambdaQueryWrapper<SysDept>()
            .select(SysDept::getDeptName, SysDept::getDeptCategory).eq(SysDept::getDeptId, dept.getParentId()));
        if (ObjectUtil.isNotNull(parentDept)) {
            dept.setParentName(parentDept.getDeptName());
            dept.setParentCategory(parentDept.getDeptCategory());
        }
            .select(SysDept::getDeptName).eq(SysDept::getDeptId, dept.getParentId()));
        dept.setParentName(ObjectUtil.isNotNull(parentDept) ? parentDept.getDeptName() : null);
        return dept;
    }