package com.usky.backend.client;

import com.usky.backend.domain.*;
import com.usky.backend.domain.request.LastQueryVo;
import com.usky.backend.domain.response.LastResultVo;
import com.usky.common.core.bean.ApiResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(contextId = "dataQueryClient", value = "usky-backend")
public interface DataQueryClient {

    @GetMapping(value = "status")
    ApiResult<List<StatusVO>> status();

    @RequestMapping(value = "deviceDataTotal")
    List<Map<String,Object>> deviceDataTotal(@RequestBody DataTotalRequestVO requestVO);

    @RequestMapping(value = "deviceDataAverage")
    List<DataAverageResponseVO> deviceDataAverage(@RequestBody DataAverageRequestVO requestVO);

    @RequestMapping(value = "DataAverageExport")
    List<DataAverageExportVO> DataAverageExport(@RequestBody DataAverageRequestVO requestVO);
}
