package com.sptg.iot.api.feigns;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.iot.api.entity.IotAuthentication;
import com.sptg.iot.api.feigns.fallback.IotAuthFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author zwx
 * @create 2020/10/27 16:28
 */
@FeignClient(value = "smart-house-iot", fallbackFactory = IotAuthFeignFallbackFactory.class)
public interface IotAuthFeign {

    /**
     * 认证接口
     * @return
     */
    @PostMapping(value = "/iot/auth/{appId}")
    public ResultBean<IotAuthentication> auth(@PathVariable(value = "appId") String appId);
}
