package com.njcn.harmonic.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.harmonic.api.fallback.HarmDataFeignClientFallbackFactory;
import com.njcn.harmonic.pojo.param.HistoryHarmParam;
import com.njcn.influx.pojo.dto.HarmHistoryDataDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        value = ServerInfo.HARMONIC,
        path = "/harmonic",
        fallbackFactory = HarmDataFeignClientFallbackFactory.class,
        contextId = "harmonic")
public interface HarmDataFeignClient {


    /**
     * 获取监测点信息
     * @param  historyHarmParam 请求查询参数
     * @return 结果
     */
    @PostMapping("/getHistoryHarmData")
    HttpResult<HarmHistoryDataDTO> getHistoryHarmData(@RequestBody HistoryHarmParam historyHarmParam);

}
