package com.ho.flow.feignclient;

import com.ho.business.entity.*;
import com.ho.business.vo.req.DeviceReqVO;
import com.ho.business.vo.req.EventColReq;
import com.ho.business.vo.req.StationPageReqVO;
import com.ho.business.vo.req.device.DeviceListReq;
import com.ho.business.vo.req.device.DeviceTypeQuery;
import com.ho.business.vo.req.deviceTypeCol.DeviceTypeColQueryVo;
import com.ho.business.vo.req.inspectionFault.InspectionFaultVo;
import com.ho.business.vo.resp.DeviceRespVO;
import com.ho.common.tools.exception.BaseResponseCode;
import com.ho.common.tools.exception.BusinessException;
import com.ho.common.tools.exception.DataResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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


@Component
@Slf4j
public class BusinessFeignClientFallback implements BusinessFeignClient {

    @Override
    public DataResult<List<Station>> selectByStationIds(List<Integer> ids) {
        log.error("调用 [BusinessClient.selectByStationIds] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

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

    @Override
    public DataResult<List<Station>> selectByGroupId(Integer group) {
        log.error("调用 [BusinessClient.selectByGroupId] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<Station> selectByStationId(Integer id) {
        log.error("调用 [BusinessClient.selectByStationId] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<Station>> selectStationByCondition(StationPageReqVO vo) {
        log.error("调用 [BusinessClient.selectStationByCondition] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<Device> selectByDeviceId(Integer id) {
        log.error("调用 [BusinessClient.selectByDeviceId] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<DeviceRespVO>> selectDeviceByStationIdsAndSrcId(Map<Integer, List<Integer>> map) {
        log.error("调用 [BusinessClient.selectDeviceByStationIdsAndSrcId] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<Device>> selectDeviceByStationIdsAndSrcIdVirtual(DeviceListReq deviceListReq) {
        log.error("调用 [BusinessClient.selectDeviceByStationIdsAndSrcIdVirtual] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<DeviceRespVO>> selectDeviceByDeviceType(String deviceType) {
        log.error("调用 [BusinessClient.selectDeviceByDeviceType] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public List<EventColReq> getQueryEventParam(DeviceListReq deviceListReq) {
        log.error("调用 [BusinessClient.getQueryEventParam] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<DeviceRespVO>> selectByDeviceIds(List<Integer> ids) {
        log.error("调用 [BusinessClient.selectByDeviceIds] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<DeviceType> selectByPId(Integer pid) {
        log.error("调用 [BusinessClient.selectByPId] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<DeviceType>> getDeviceTypes(List<Integer> deviceIds) {
        log.error("调用 [BusinessClient.getDeviceTypes] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult<List<Device>> selectDeviceByStationIds(DeviceReqVO deviceReqVO) {
        log.error("调用 [BusinessClient.selectDeviceByStationIds] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public List<DeviceTypeConfig> getDeviceTypeConfigList(DeviceTypeQuery deviceTypeQuery) {
        log.error("调用 [BusinessClient.getDeviceTypeConfigList] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public List<DeviceTypeCol> selectDeviceTypeCol(DeviceTypeColQueryVo vo) {
        log.error("调用 [BusinessClient.selectDeviceTypeCol] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

    @Override
    public DataResult updateInspectionFault(InspectionFaultVo vo) {
        log.error("调用 [BusinessClient.updateInspectionFault] 异常!");
        throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
    }

}
