class OrganizationDimensionProvider extends BaseDimensionProvider<OrganizationEntity> {

    public OrganizationDimensionProvider(ReactiveRepository<OrganizationEntity, String> repository,
                                         DefaultDimensionUserService dimensionUserService,
                                         ApplicationEventPublisher eventPublisher) {
        super(repository, eventPublisher, dimensionUserService);
    }

    @Override
    protected DimensionType getDimensionType() {
        return OrgDimensionType.org;
    }

    @Override
    protected Mono<Dimension> convertToDimension(OrganizationEntity entity) {
        return Mono.just(entity.toDimension(true));
    }

    @Override
    public Flux<? extends Dimension> getDimensionByUserId(String s) {<FILL_FUNCTION_BODY>}

}

        Map<String, Dimension> dimensions = new LinkedHashMap<>();

        return DimensionTerm
            .inject(createQuery(), "id", getDimensionType().getId(), Collections.singletonList(s))
            .fetch()
            //直接关联的部门
            .doOnNext(org -> dimensions.put(org.getId(), org.toDimension(true)))
            .concatMap(e -> ObjectUtils.isEmpty(e.getPath())
                ? Mono.just(e)
                : createQuery()
                .where()
                //使用path快速查询
                .like$("path", e.getPath())
                .fetch()
                //子级部门
                .doOnNext(org -> dimensions.putIfAbsent(org.getId(), org.toDimension(false)))
            )
            .thenMany(Flux.defer(() -> Flux.fromIterable(dimensions.values())));
    
<methods>public non-sealed void <init>() ,public Flux<? extends DimensionType> getAllType() ,public Mono<? extends Dimension> getDimensionById(DimensionType, java.lang.String) ,public Flux<? extends Dimension> getDimensionByUserId(java.lang.String) ,public Flux<? extends Dimension> getDimensionsById(DimensionType, Collection<java.lang.String>) ,public Flux<java.lang.String> getUserIdByDimensionId(java.lang.String) ,public void handleEvent(EntityDeletedEvent<org.jetlinks.community.auth.entity.OrganizationEntity>) ,public void handleEvent(EntitySavedEvent<org.jetlinks.community.auth.entity.OrganizationEntity>) ,public void handleEvent(EntityModifyEvent<org.jetlinks.community.auth.entity.OrganizationEntity>) <variables>protected final non-sealed DefaultDimensionUserService dimensionUserService,private Class<?> entityType,protected final non-sealed org.springframework.context.ApplicationEventPublisher eventPublisher,protected final non-sealed ReactiveRepository<org.jetlinks.community.auth.entity.OrganizationEntity,java.lang.String> repository