package com.ho.business.feignclient;

import com.ho.business.entity.HeartbeatResp;
import com.ho.business.entity.OrderIssuedReqVO;
import com.ho.business.entity.OrderPlanPowerReq;
import com.ho.business.entity.OrderProcessResp;
import com.ho.business.vo.req.StationReq;
import com.ho.common.tools.entity.WeatherRespVo;
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.vo.req.CardInfoReqVo;
import com.ho.common.tools.vo.req.WeatherReq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author fancl
 * @desc: 文件中心FeignFallBack
 * @date 2023/1/13
 */
@Component
@Slf4j
public class FileCenterFeignClientFallBack implements FileCenterFeignClient{

    @Override
    public DataResult<WeatherRespVo> queryWeather(WeatherReq weatherReq) {
        log.error("调用 [FileCenterFeignClientFallBack.queryWeather] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public Boolean getBySnIsOnline(String sn) {
        log.error("调用 [Business.getBySnIsOnline] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<WeatherRespVo> getByStationIdWeather(StationReq stationReq) {
        log.error("调用 [Business.getByStationIdWeather] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<HeartbeatResp> fileUploadForDevice(MultipartFile file, Integer stationId, String serialNo, String filePath) {
        log.error("调用 [Business.fileUploadForDevice] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<HeartbeatResp> orderIssued(OrderIssuedReqVO vo) {
        log.error("调用 [Business.orderIssued] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<OrderProcessResp> progressBar(OrderIssuedReqVO vo) {
        log.error("调用 [Business.progressBar] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<HeartbeatResp> sendPlanPowerOrder(OrderPlanPowerReq vo) {
        log.error("调用 [Business.sendPlanPowerOrder] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<CardInfoReqVo>> selectByCondition(CardInfoReqVo cardInfo) {
        log.error("调用 [Business.selectByCondition] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public void insertValue(CardInfoReqVo cardInfo) {
        log.error("调用 [Business.insertValue] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public void updateValue(CardInfoReqVo cardInfo) {
        log.error("调用 [Business.updateValue] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public void deleteByPrimaryKey(List<Integer> carIdList) {
        log.error("调用 [Business.deleteByPrimaryKey] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }
}
