class PermissionController {

    private final DefaultPermissionService permissionService;

    @GetMapping("/id/_validate")
    @QueryAction
    @Operation(summary = "验证权限ID是否合法")
    public Mono<ValidationResult> permissionIdValidate2(@RequestParam @Parameter(description = "权限ID") String id) {<FILL_FUNCTION_BODY>}
}

        return LocaleUtils.currentReactive()
            .flatMap(locale -> {
                PermissionEntity entity = new PermissionEntity();
                entity.setId(id);
                entity.tryValidate("id", CreateGroup.class);

                return permissionService
                    .findById(id)
                    .map(permission -> ValidationResult
                        .error(LocaleUtils.resolveMessage("error.id_already_exists", locale)));
            })
            .defaultIfEmpty(ValidationResult.success())
            .onErrorResume(ValidationException.class, e -> Mono.just(e.getI18nCode())
                .map(ValidationResult::error));
    
<no_super_class>