package com.njcn.energy.pojo.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.energy.pojo.api.fallback.EleOnlineRateFallbackFactory;
import com.njcn.energy.pojo.dto.OnlineRateDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 类的介绍：
 *
 * @author xuyang
 * @version 1.0.0
 * @createTime 2022/4/20 15:08
 */
@FeignClient(value = ServerInfo.ENERGY,path = "/onlineRate",fallbackFactory = EleOnlineRateFallbackFactory.class)
public interface EleOnlineRateFeignClient {

    @PostMapping("/getDeviceTime")
    HttpResult<List<OnlineRateDTO>> getDeviceTime(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);

}
