class RoleGroupController implements ReactiveServiceCrudController<RoleGroupEntity, String> {

    private final RoleGroupService roleGroupService;

    @PostMapping("/detail/_query/tree")
    @Operation(summary = "查询分组及角色(树状)")
    @SaveAction
    public Flux<RoleGroupDetailTree> queryDetailTree(@RequestParam(defaultValue = "false") @Parameter(description = "true:query为角色条件,false:query为分组条件") boolean queryByRole,
                                                     @RequestBody Mono<QueryParamEntity> query) {<FILL_FUNCTION_BODY>}

    @Override
    public ReactiveCrudService<RoleGroupEntity, String> getService() {
        return roleGroupService;
    }
}


        return Mono
            .zip(queryByRole ? query : Mono.just(new QueryParamEntity()),
                 queryByRole ? Mono.just(new QueryParamEntity()) : query)
            .flatMapMany(tp2 -> roleGroupService.queryDetailTree(tp2.getT2(), tp2.getT1()));


    
<no_super_class>