package com.ho.business.feignclient;

import com.ho.business.vo.resp.point.PointCurveResp;
import com.ho.common.tools.exception.BaseResponseCode;
import com.ho.common.tools.exception.BusinessException;
import com.ho.common.tools.exception.DataResult;
import com.ho.common.tools.util.PageResult;
import com.ho.common.tools.vo.req.PointData;
import com.ho.common.tools.vo.req.StationHomeRespVo;
import com.ho.datacollect.api.vo.req.add.TdBase;
import com.ho.datacollect.api.vo.req.inverter.InverterCurveListVo;
import com.ho.td.api.entity.elecMeter.ElecPowerGeneration;
import com.ho.td.api.entity.inverter.InverterCurrent;
import com.ho.td.api.entity.inverter.InverterTimingGenerate;
import com.ho.td.api.entity.query.TdBaseTimeQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @描述 UserClient失败回调
 * @创建时间 2021/8/9
 * @修改人
 */
@Component
public class TdFeignClientFallback implements TdFeignClient{

    Logger log = LoggerFactory.getLogger(getClass());

    @Override
    public DataResult<InverterCurveListVo> queryInterval(TdBase tdBase) {
        log.error("调用 [TdClient.queryInterval] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<InverterCurveListVo> queryHistoryInterval(TdBase tdBase) {
        log.error("调用 [TdClient.queryHistoryInterval] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<InverterCurveListVo> queryColList(TdBase tdBase) {
        log.error("调用 [TdClient.queryColList] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<InverterTimingGenerate>> timingGenerateList(TdBaseTimeQuery baseTimeQuery) {
        log.error("调用 [TdClient.timingGenerateList] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<InverterCurrent>> getCurrentMonthAndYear(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.getCurrentMonthAndYear] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }
    @Override
    public DataResult<List<PointCurveResp>> queryPointTable(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.queryPointTable] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<ElecPowerGeneration> getTodayPowerGeneration(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.getTodayPowerGeneration] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<StationHomeRespVo>> getPointTable(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.getPointTable] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<PointData>> getPointDataShow(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.getPointDataShow] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<PointData>> getPointDetails(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.getPointDataShow] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public Integer getCountPointDataShow(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.getCountPointDataShow] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<PointData>> getPointData(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.getPointData] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }


    @Override
    public DataResult<List<PointCurveResp>> querySignalValue(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.querySignalValue] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<StationHomeRespVo>> queryHisValueList(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.queryHisValueList] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public PageResult queryAllValue(TdBase tdBase) {
        log.error("调用 [TdClient.queryAllValue] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public Integer getCountData(@RequestBody TdBase tdBase){
        log.error("调用 [TdClient.getCountData] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<PointData> selectMaxValue(TdBaseTimeQuery query) {
        log.error("调用 [TdClient.selectMaxValue] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<StationHomeRespVo>> queryPointTableList(TdBaseTimeQuery query) {
        log.error("调用 [TdClient.queryPointTableList] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<StationHomeRespVo>> queryPointDataList(TdBaseTimeQuery query) {
        log.error("调用 [TdClient.queryPointDataList] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<StationHomeRespVo> getGeneratorSetInfo(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.getGeneratorSetInfo] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<PointCurveResp>> querySignal(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.querySignal] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<PointCurveResp>> queryMeasure(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.queryMeasure] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<StationHomeRespVo> getToDayPVCharge(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.getToDayPVCharge] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<StationHomeRespVo> getToDayPVMpptCharge(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.getToDayPVCharge] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult modifyHistoryData(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.modifyHistoryData] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult selectLastedValue(TdBaseTimeQuery tdBaseTimeQuery) {
        log.error("调用 [TdClient.selectLastedValue] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }
}
