class DeviceSelectorSpec extends VariableSource {
    /**
     * @see DeviceSelectorProvider#getProvider()
     */
    @Schema(description = "选择器标识")
    @NotBlank
    private String selector;

    /**
     * <pre>{@code
     *
     *  // org.hswebframework.ezorm.core.param.Term
     * 设备标签 : [{"value":[{"column":"tagKey","value":"tagValue"}],"name":"标签说明"}]
     *
     * 固定设备 : [{"value":"设备ID","name":"设备名称"}]
     *
     * 按部门 : [{"value":"部门ID","name":"部门名称"}]
     * }</pre>
     *
     * @see SelectorValue
     */
    @Schema(description = "选择器的值,如选择的部门ID,标签信息等")
    private List<SelectorValue> selectorValues;

    @Schema(description = "固定设备ID")
    @Override
    public Object getValue() {
        return super.getValue();
    }

    public DeviceSelectorSpec() {
    }

    private DeviceSelectorSpec(String selector, List<SelectorValue> selectorValue) {
        this.selector = selector;
        super.setValue(selectorValue);
    }


    /**
     * @param selector      selector
     * @param selectorValue value
     * @see DeviceSelectorProvider#getProvider()
     */
    public static DeviceSelectorSpec selector(@NotNull String selector, List<SelectorValue> selectorValue) {
        return new DeviceSelectorSpec(selector, selectorValue);
    }

    public Flux<Object> resolveSelectorValues(Map<String, Object> context) {<FILL_FUNCTION_BODY>}


    @Override
    public void validate() {
        DeviceSelectorProviders.getProviderNow(selector);
    }

    public Mono<ThingMetadata> getDeviceMetadata(ThingsRegistry registry, String productId) {
        //固定设备时使用设备的物模型
        if (getSource() == Source.fixed && DeviceSelectorProviders.PROVIDER_FIXED.equals(getSelector())) {
            List<SelectorValue> fixed = getSelectorValues();
            if (CollectionUtils.isNotEmpty(fixed) && fixed.size() == 1) {
                return registry
                    .getThing(DeviceThingType.device,String.valueOf(fixed.get(0).getValue()))
                    .flatMap(Thing::getMetadata);
            }
        }
        return registry
            .getTemplate(DeviceThingType.device,productId)
            .flatMap(ThingTemplate::getMetadata);
    }
}

        if (CollectionUtils.isNotEmpty(selectorValues)) {
            return Flux
                .fromIterable(selectorValues)
                .mapNotNull(SelectorValue::getValue);
        }
        return super.resolve(context);
    
<methods>public non-sealed void <init>() ,public static org.jetlinks.community.relation.utils.VariableSource fixed(java.lang.Object) ,public static java.lang.Object getNestProperty(java.lang.String, Map<java.lang.String,java.lang.Object>) ,public static org.jetlinks.community.relation.utils.VariableSource of(java.lang.Object) ,public static org.jetlinks.community.relation.utils.VariableSource relation(org.jetlinks.community.relation.utils.VariableObjectSpec) ,public Flux<java.lang.Object> resolve(Map<java.lang.String,java.lang.Object>) ,public Flux<java.lang.Object> resolve(Map<java.lang.String,java.lang.Object>, ConfigKey<?>) ,public java.lang.Object resolveStatic(Map<java.lang.String,java.lang.Object>) ,public static Flux<java.lang.Object> resolveValue(java.lang.String, Map<java.lang.String,java.lang.Object>, ConfigKey<java.lang.String>) ,public static java.lang.Object resolveValue(java.lang.String, Map<java.lang.String,java.lang.Object>) ,public Map<java.lang.String,java.lang.Object> toMap() ,public static org.jetlinks.community.relation.utils.VariableSource upper(java.lang.String) ,public void validate() ,public static Map<java.lang.String,java.lang.Object> wrap(Map<java.lang.String,java.lang.Object>, Map<java.lang.String,java.lang.Object>) <variables>private Map<java.lang.String,java.lang.Object> options,private org.jetlinks.community.relation.utils.VariableObjectSpec relation,private static final long serialVersionUID,private org.jetlinks.community.relation.utils.VariableSource.Source source,private java.lang.String upperKey,private java.lang.Object value