class WebFluxPermissionController implements ReactiveServiceCrudController<PermissionEntity, String> {

    @Autowired
    private DefaultPermissionService permissionService;

    @Autowired
    private PermissionProperties permissionProperties;

    @Override
    public ReactiveCrudService<PermissionEntity, String> getService() {
        return permissionService;
    }

    @PutMapping("/status/{status}")
    @SaveAction
    @Operation(summary = "批量修改权限状态")
    public Mono<Integer> changePermissionState(@PathVariable @Parameter(description = "状态值:0禁用,1启用.") Byte status,
                                               @RequestBody List<String> idList) {

        return Mono.just(idList)
                   .filter(CollectionUtils::isNotEmpty)
                   .flatMap(list -> permissionService
                           .createUpdate()
                           .set(PermissionEntity::getStatus, status)
                           .where()
                           .in(PermissionEntity::getId, list)
                           .execute())
                   .defaultIfEmpty(0);

    }

    @GetMapping("/_query/for-grant")
    @ResourceAction(id = "grant", name = "赋权")
    @QueryNoPagingOperation(summary = "获取用于赋权的权限列表")
    public Flux<PermissionEntity> queryForGrant(QueryParamEntity query) {<FILL_FUNCTION_BODY>}
}

        return Authentication
                .currentReactive()
                .flatMapMany(auth -> permissionProperties
                        .getFilter()
                        .doFilter(permissionService.query(query.noPaging()), auth));
    
<no_super_class>