package com.sptg.permissions.api.feigns;

import com.sptg.permissions.api.entity.Conf;
import com.sptg.permissions.api.feigns.fallback.ConfFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * title: ConfFeign
 * package: com.sptg.permissions.api.feigns
 * description: 配置服务接口
 *
 *                  
 *                
 */
@FeignClient(value = "smart-house-permissions",fallbackFactory = ConfFeignFallbackFactory.class)
public interface ConfFeign {

    /**
     * 功能描述: 获取文件服务器地址
     * @return String
     *                  
     *                      
     */
    @GetMapping(value = "/conf/getFileServerHost")
    String getFileServerHost();

    /**
     * 功能描述: 根据标识获取配置
     * @param token 标识
     * @return Conf
     *                  
     *                      
     */
    @GetMapping(value = "/conf/getEntityByToken")
    Conf getEntityByToken(@RequestParam(value = "token") String token);
}
