package com.yida.data.system.feign;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.constant.FebsServerConstant;
import com.yida.data.common.core.entity.system.WhiteList;
import com.yida.data.system.fallback.RemoteWhiteListServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "whiteListServiceClient", fallbackFactory =
        RemoteWhiteListServiceFallback.class)
public interface RemoteWhiteListService {

    /**
     * 根据功能名称获取对应的白名单信息
     *
     * @param functionName 功能名称
     * @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.system.WhiteList>
     * @author ZYJ
     * @date 2023/2/21 15:05
     */
    @GetMapping("/in/whiteList/getWhiteList")
    ResultBean<WhiteList> getWhiteList(@RequestParam("functionName") String functionName);
}
