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.RStatLimitRateDFeignClientFallbackFactory;
import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
import com.njcn.harmonic.pojo.vo.RStatLimitTargetVO;
import org.springframework.cloud.openfeign.FeignClient;
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;

@FeignClient(
        value = ServerInfo.HARMONIC,
        path = "/limitRateD",
        fallbackFactory = RStatLimitRateDFeignClientFallbackFactory.class,
        contextId = "limitRateD")
public interface RStatLimitRateDClient {


    @PostMapping("/monitorIdsGetLimitRateInfo")
    HttpResult<List<RStatLimitRateDPO>> monitorIdsGetLimitInfo(@RequestBody RStatLimitQueryParam rStatLimitQueryParam);


    @PostMapping("/monitorIdsGetLimitTargetInfo")
    HttpResult<List<RStatLimitTargetDPO>> monitorIdsGetLimitTargetInfo(@RequestBody RStatLimitQueryParam rStatLimitQueryParam);

    @PostMapping("/monitorOverLimitDays")
    HttpResult<List<RStatLimitTargetVO>> monitorOverLimitDays(@RequestBody RStatLimitQueryParam rStatLimitQueryParam);

    @PostMapping("/getOverData")
    HttpResult<List<RStatLimitRateDPO>> getOverData(@RequestParam("lineId") String lineId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime, @RequestParam("type") Integer type);
}
