package com.yuchen.saas.manage.dict.api.feign;


import com.yuchen.saas.manage.dict.api.entity.DictBiz;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(
		value = AppNameConstant.SAAS_SYSTEM,
		fallback = IDictBizClientFallback.class
)
public interface IDictBizClient {
	
	String API_PREFIX = "/client";
	String GET_BY_ID = API_PREFIX + "/dict-biz/get-by-id";
	String GET_VALUE = API_PREFIX + "/dict-biz/get-value";
	String GET_LIST = API_PREFIX + "/dict-biz/get-list";
	
	
	@GetMapping(GET_BY_ID)
	R<DictBiz> getById(@RequestParam("id") Long id);
	
	
	@GetMapping(GET_VALUE)
	R<String> getValue(@RequestParam("code") String code, @RequestParam("dictKey") String dictKey);
	
	
	@GetMapping(GET_LIST)
	R<List<DictBiz>> getList(@RequestParam("code") String code);
	
}
