package com.njcn.csharmonic.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csharmonic.api.fallback.CsHarmonicPlanFeignClientFallbackFactory;
import com.njcn.csharmonic.pojo.po.CsHarmonicPlan;
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;

import java.util.List;

/**
 * @author xy
 */
@FeignClient(value = ServerInfo.CS_HARMONIC_BOOT, path = "/csHarmonicPlan", fallbackFactory = CsHarmonicPlanFeignClientFallbackFactory.class,contextId = "csHarmonicPlan")
public interface CsHarmonicPlanFeignClient {

    @GetMapping("/getById")
    @ApiOperation("根据ID查询稳态指标方案")
    HttpResult<CsHarmonicPlan> getById(@RequestParam("id") String id);

    @GetMapping("/getByName")
    @ApiOperation("根据名称查询稳态指标方案")
    HttpResult<List<CsHarmonicPlan>> getByName(@RequestParam("name") String name);

}
