package com.sptg.iot.api.feigns;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.iot.api.entity.IotSubscribe;
import com.sptg.iot.api.feigns.fallback.IotSubscribeFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author zwx
 * @create 2020/11/5 14:30
 */
@FeignClient(value = "smart-house-iot", fallbackFactory = IotSubscribeFeignFallbackFactory.class)
public interface IotSubscribeFeign {

    @PostMapping(value = "/iot/subscribe")
    public ResultBean<String> subscribe(@RequestBody IotSubscribe iotSubscribe);

    @PostMapping(value = "/iot/inquire")
    public ResultBean<String> inquire(@RequestBody IotSubscribe iotSubscribe);
}
