package com.ho.datacollect.feignclient;

import com.ho.common.tools.exception.BaseResponseCode;
import com.ho.common.tools.exception.BusinessException;
import com.ho.common.tools.exception.DataResult;
import com.ho.datacollect.api.vo.req.add.*;
import com.ho.datacollect.api.vo.req.energyConsumption.TdEnergyConsumptionReq;
import com.ho.datacollect.api.vo.req.inverter.InverterAddReq;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

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

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

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

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

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

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

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

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

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

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

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

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