package net.northking.cctp.dataPool.feign;

import io.swagger.annotations.ApiOperation;
import net.northking.cctp.common.feign.FeignCctpConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "cctp-projects", configuration = {FeignCctpConfig.class}, path = "/cctp-projects")
public interface ProjectFeignClient {

    @ApiOperation(value = "根据系统id查关联的环境id集合")
    @PostMapping(value = "/v1/query/selectEnvIds",
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE,
            consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    List<String> selectEnvIds(@RequestParam("proId") String proId);

    @ApiOperation(value = "查询系统关联的环境排序")
    @PostMapping(value = "/v1/query/envListSeq",
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE,
            consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    List<String> queryEnvListSeq(@RequestParam("proId") String proId);
}
