package net.northking.cctp.common.feign;

import com.hzbank.testteam.autotest.dependencies.baseDefineDependency.dto.PageQueryDTO;
import com.hzbank.testteam.autotest.dependencies.baseDefineDependency.entity.Environment;
import com.hzbank.testteam.autotest.dependencies.baseDefineDependency.vo.ResponseVO;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户服务
 */
@FeignClient(contextId = "apiAtsEnviromentFeign", value = "interface-test", path = "/interface-test/api/environment/")
public interface ApiAtsEnviromentFeign {

    @ApiOperation("获取有效环境列表")
    @PostMapping("/pageData")
    ResponseVO<Object> getATSEnvData(@ApiParam("分页查询参数") @RequestBody PageQueryDTO pageQueryDTO);

    @ApiOperation("获取有效环境列表")
    @GetMapping("/listByProject")
    ResponseVO<List<Environment>> listByProject(@ApiParam("系统ID") @RequestParam("projectId") Long projectId);

    @ApiOperation("根据环境Id获取环境信息")
    @PostMapping("/getEnvInfoById")
    ResponseVO<List<Environment>> getEnvInfoById(@ApiParam("环境ID集合") @RequestBody List<Long> ids);
}
