package com.njcn.user.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.user.api.fallback.AuthClientFeignClientFallbackFactory;
import com.njcn.user.pojo.po.AuthClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


/**
 * @author hongawen
 * @version 1.0.0
 * @date 2021年12月15日 13:27
 */
@FeignClient(value = ServerInfo.USER, path = "/authClient", fallbackFactory = AuthClientFeignClientFallbackFactory.class,contextId = "authClient")
public interface AuthClientFeignClient {


    /**
     * 根据客户端名称获取客户端信息
     * @param clientName 客户端名称
     * @return 客户端信息
     */
    @GetMapping("/getAuthClientByName/{clientName}")
    HttpResult<AuthClient> getAuthClientByName(@PathVariable("clientName") String clientName);

}
