class DefaultUserBindService implements UserBindService {

    private final ReactiveRedisOperations<Object, Object> redis;


    @Override
    public Mono<String> generateBindCode(UserInfo userInfo) {<FILL_FUNCTION_BODY>}


    @Override
    public Mono<UserInfo> getUserInfoByCode(String bindCode) {
        ReactiveValueOperations<Object, Object> operations = redis.opsForValue();
        return operations
            .get(bindCode)
            .cast(UserInfo.class)
            .flatMap(userInfo -> operations.delete(bindCode).thenReturn(userInfo))
            .switchIfEmpty(Mono.error(() -> new BusinessException("error.user_binding_code_incorrect")));
    }


    public void checkUserBind(Authentication authentication, UserInfo userInfo){
        if (!Objects.equals(authentication.getUser().getId(), userInfo.getUserId())){
            throw new BusinessException("error.illegal_bind");
        }
    }


}

        String code = UserBindService.USER_BIND_CODE_PRE + IDGenerator.MD5.generate();
        return redis
            .opsForValue()
            .set(code, userInfo, Duration.ofMinutes(1))
            .thenReturn(code);
    
<no_super_class>