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.PqGovernPlanClientFallbackFactory;
import com.njcn.csharmonic.pojo.po.PqGovernPlan;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author xy
 */
@FeignClient(value = ServerInfo.CS_HARMONIC_BOOT, path = "/pqGovernPlan", fallbackFactory = PqGovernPlanClientFallbackFactory.class,contextId = "pqGovernPlan")

public interface PqGovernPlanFeignClient {

    @GetMapping("/getListExcludeNull")
    @ApiOperation("查询所有治理方案(剔除治理前后监测点为空的数据)")
    HttpResult<List<PqGovernPlan>> getListExcludeNull();

    @PostMapping("/getListByMonitorPoint")
    @ApiOperation("清空治理前后监测点数据")
    HttpResult<List<PqGovernPlan>> getListByMonitorPoint(@RequestBody List<String> ids);

    @GetMapping("/getById")
    @ApiOperation("根据ID查询治理方案")
    HttpResult<PqGovernPlan> getById(@RequestParam("id") String id);

}
