class DeviceGatewayConfigService implements DeviceGatewayPropertiesManager, DataReferenceProvider {


    private final DeviceGatewayService deviceGatewayService;

    @Override
    public String getId() {
        return DataReferenceManager.TYPE_NETWORK;
    }

    @Override
    public Flux<DataReferenceInfo> getReference(String networkId) {<FILL_FUNCTION_BODY>}

    @Override
    public Flux<DataReferenceInfo> getReferences() {
        return deviceGatewayService
            .createQuery()
            .where()
            .and(DeviceGatewayEntity::getChannel, DeviceGatewayProvider.CHANNEL_NETWORK)
            .notNull(DeviceGatewayEntity::getChannelId)
            .fetch()
            .map(e -> DataReferenceInfo.of(e.getId(),DataReferenceManager.TYPE_NETWORK, e.getChannelId(), e.getName()));
    }

    public DeviceGatewayConfigService(DeviceGatewayService deviceGatewayService) {
        this.deviceGatewayService = deviceGatewayService;
    }

    @Override
    public Mono<DeviceGatewayProperties> getProperties(String id) {

        return deviceGatewayService
            .findById(id)
//            .switchIfEmpty(Mono.error(new NotFoundException("该设备网关不存在")))
            .map(DeviceGatewayEntity::toProperties);
    }


    @Override
    public Flux<DeviceGatewayProperties> getPropertiesByChannel(String channel) {
        return deviceGatewayService
            .createQuery()
            .where()
            .and(DeviceGatewayEntity::getChannel, channel)
            .fetch()
            .map(DeviceGatewayEntity::toProperties);
    }

}

        return deviceGatewayService
            .createQuery()
            .where()
            .and(DeviceGatewayEntity::getChannel, DeviceGatewayProvider.CHANNEL_NETWORK)
            .is(DeviceGatewayEntity::getChannelId, networkId)
            .fetch()
            .map(e -> DataReferenceInfo.of(e.getId(),DataReferenceManager.TYPE_NETWORK, e.getChannelId(), e.getName()));
    
<no_super_class>