package com.njcn.prepare.harmonic.api.line;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.prepare.harmonic.api.line.fallback.HarmonicMetricFeignClientFallbackFactory;
import com.njcn.prepare.harmonic.pojo.param.LineParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author xiaoyao
 * @version 1.0.0
 * @createTime 2022/11/7 15:12
 */

@FeignClient(
        value = ServerInfo.PREPARE_BOOT,
        path = "/metric",
        fallbackFactory = HarmonicMetricFeignClientFallbackFactory.class
)
public interface HarmonicMetricFeignClient {

    @PostMapping("/metricData")
    HttpResult<String> metricData(@RequestBody @Validated LineParam lineParam);

    @PostMapping("/metricDataToMysql")
    HttpResult<String> metricDataToMysql(@RequestBody @Validated LineParam lineParam);
}
