class MenuGrantService {

    private final AuthorizationSettingDetailService settingService;
    private final ReactiveRepository<MenuBindEntity, String> bindRepository;
    private final ReactiveRepository<MenuEntity, String> menuRepository;


    /**
     * 对菜单进行授权
     *
     * @param request 授权请求
     * @return void
     */
    @Transactional
    public Mono<Void> grant(MenuGrantRequest request) {<FILL_FUNCTION_BODY>}
}

        return Flux
            .concat(
                //先删除原已保存的菜单信息
                bindRepository
                    .createDelete()
                    .where(MenuBindEntity::getTargetType, request.getTargetType())
                    .and(MenuBindEntity::getTargetId, request.getTargetId())
                    .execute(),
                //保存菜单信息
                bindRepository.save(request.toBindEntities()),
                settingService.clearPermissionUserAuth(request.getTargetType(), request.getTargetId())
            )
//                //保存权限信息
//                Mono
//                    .zip(Mono.just(request),
//                         menuRepository
//                             .createQuery()
//                             .where(MenuEntity::getStatus, 1)
//                             .fetch()
//                             .collectList(),
//                         MenuGrantRequest::toAuthorizationSettingDetail
//                    )
//                    //保存后端权限信息
//                    .flatMap(setting -> settingService.saveDetail(null, Flux.just(setting))))
            .then()
            ;
    
<no_super_class>