package cn.ey.biz.module.system.api.config;

import cn.ey.biz.common.pojo.R;
import cn.ey.biz.module.system.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME)
@Api(tags = "RPC 服务 - 配置数据")
public interface ConfigApi {

    String PREFIX = ApiConstants.PREFIX + "/config";

    @GetMapping(PREFIX + "/get")
    @ApiOperation("获得指定的配置数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "configKey", value = "配置键", example = "level", required = true, dataTypeClass = String.class)
    })
    R<String> get(@RequestParam("configKey") String configKey);

}
