@ -93,7 +93,7 @@ public class SysOrgServiceImpl extends CrudServiceImpl<SysOrgMapper, SysOrg, Sys
}
// 如果上级ID 为空 则默认为 0
if(StringUtils.isEmpty(model.getParentId())){
if(StringUtils.isEmpty(model.getParentId()) || TOP_PARENT_ID.equals(model.getParentId())){
model.setParentId(TOP_PARENT_ID);
model.setParentIds(TOP_PARENT_ID);
@ -126,6 +126,9 @@ public class UserOrgRefServiceImpl extends ServiceImpl<UserOrgRefMapper, SysUser
queryWrapper.eq(
FieldUtil.humpToUnderline(MyBatisConstants.FIELD_PARENT_ID), PARENT_ID
);
FieldUtil.humpToUnderline(MyBatisConstants.FIELD_TENANT), userModel.getTenantId()
// 注意 之前这儿会有死循环数据权限查询问题
List<SysOrg> orgList = iSysOrgService.list(queryWrapper);