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.UploadGwDataFallbackFactory;
import com.njcn.harmonic.pojo.param.UploadDataParam;
import com.njcn.harmonic.pojo.param.UploadParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author xuyang
 */
@FeignClient(
        value = ServerInfo.HARMONIC,
        path = "/upload",
        fallbackFactory = UploadGwDataFallbackFactory.class,
        contextId = "upload")
public interface UploadGwDataFeignClient {

    @PostMapping("/uploadPointStatisticalData")
    HttpResult<String> uploadPointStatisticalData(@RequestBody UploadParam param);

    @PostMapping("/uploadSubstationStatisticalData")
    HttpResult<String> uploadSubstationStatisticalData(@RequestBody UploadParam param);

    @PostMapping("/uploadEvaluationData")
    HttpResult<String> uploadEvaluationData(@RequestBody UploadParam param);

    @PostMapping("/upGwCommPoint")
    HttpResult<String> upGwCommPoint(@RequestBody UploadDataParam param);

    @PostMapping("/upGwMainMonitor")
    HttpResult<String> upGwMainMonitor(@RequestBody UploadDataParam param);

}
