package net.northking.cctp.scriptcase.feign;

import io.swagger.annotations.ApiOperation;
import net.northking.cctp.common.feign.FeignCctpConfig;
import net.northking.cctp.scriptcase.dto.atuscriptrecord.AtuScriptInputSetQuoteFeignDto;
import net.northking.cctp.scriptcase.feign.dto.AtuDataSetFeignDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient(name = "atu-data-mgr", path = "/atu-data-mgr", configuration = {FeignCctpConfig.class})
public interface DataMgrFeignClient {

    @ApiOperation(value = "查询静态数据集对应的文件")
    @PostMapping(value = "/v1/query/getDataSetFile",
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE,
            consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public Map<String, AtuScriptInputSetQuoteFeignDto> queryDataSetFile(@RequestBody AtuDataSetFeignDto dto);

    @ApiOperation(value = "查询模糊数据集名称集合")
    @PostMapping(value = "/v1/DataRules/query/queryFuzzyDataNameMap",
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE,
            consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Map<String, String> queryFuzzyDataNameMap(@RequestBody AtuDataSetFeignDto setFeignDto);

}
