package com.ho.user.feignclient;

import com.ho.business.entity.Station;
import com.ho.common.tools.exception.BaseResponseCode;
import com.ho.common.tools.exception.BusinessException;
import com.ho.common.tools.exception.DataResult;
import com.ho.user.api.vo.req.QueryDeptReqVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
public class BusinessFeignClientFallback implements BusinessFeignClient {

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

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

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

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