package com.yida.data.system.feign;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.Dict;
import com.yida.data.common.core.entity.constant.FebsServerConstant;
import com.yida.data.system.fallback.RemoteAreaServiceFallback;
import java.util.List;
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 = "dictServiceClient",
    fallbackFactory = RemoteAreaServiceFallback.class)
public interface RemoteDictService {

    @GetMapping("/in/dict/selectDict")
    ResultBean<List<Dict>> selectDict(@RequestParam String type);


    @GetMapping("/in/dict/getDictByTypeAndValueOrLabel")
    ResultBean<Dict> getDictByTypeAndValueOrLabel(@RequestParam String type, @RequestParam String value,
        @RequestParam String label);

}