class DeviceCategoryController implements ReactiveServiceCrudController<DeviceCategoryEntity,String> {


    private final DeviceCategoryService categoryService;

    @GetMapping
    @QueryNoPagingOperation(summary = "获取全部分类")
    @Authorize(merge = false)
    public Flux<DeviceCategoryEntity> getAllCategory(@Parameter(hidden = true) QueryParamEntity query) {
        return this
            .categoryService
            .createQuery()
            .setParam(query)
            .fetch();
    }

    @GetMapping("/_tree")
    @QueryNoPagingOperation(summary = "获取全部分类(树结构)")
    @Authorize(merge = false)
    public Flux<DeviceCategoryEntity> getAllCategoryTree(@Parameter(hidden = true) QueryParamEntity query) {<FILL_FUNCTION_BODY>}


    @PostMapping("/_tree")
    @QueryNoPagingOperation(summary = "获取全部分类(树结构)")
    @Authorize(merge = false)
    public Flux<DeviceCategoryEntity> getAllCategoryTreeByQueryParam(@RequestBody Mono<QueryParamEntity> query) {
        return this
            .categoryService
            .query(query)
            .collectList()
            .flatMapMany(all-> Flux.fromIterable(TreeSupportEntity.list2tree(all, DeviceCategoryEntity::setChildren)));
    }

    @Override
    public ReactiveCrudService<DeviceCategoryEntity, String> getService() {
        return categoryService;
    }
}

        return this
            .categoryService
            .createQuery()
            .setParam(query)
            .fetch()
            .collectList()
            .flatMapMany(all-> Flux.fromIterable(TreeSupportEntity.list2tree(all, DeviceCategoryEntity::setChildren)));
    
<no_super_class>