package com.yuchen.saas.parking.charge.api.feign;

import com.yuchen.saas.parking.charge.api.entity.charge.SpcOccupyFeeBill;
import com.yuchen.saas.parking.charge.api.util.ParkChargingFeignFallbackUtils;
import com.yuchen.saas.parking.charge.api.vo.charge.OccupyFeeBillDataListVO;
import com.yuchen.saas.parking.charge.api.vo.charge.SpcOccupyFeeBillExcelVo;
import feign.hystrix.FallbackFactory;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SpcOccupyFeeBillFeignFallback implements FallbackFactory<SpcOccupyFeeBillFeignClient> {

    @Override
    public SpcOccupyFeeBillFeignClient create(Throwable throwable) {
        return new SpcOccupyFeeBillFeignClient() {
            @Override
            public R<List<SpcOccupyFeeBill>> getOccupyFeeBillDataByPlateNo(String plateNo) {
                return ParkChargingFeignFallbackUtils.printLogAndReturn(throwable);
            }



            @Override
            public R<List<OccupyFeeBillDataListVO>> getChargeBillDataListByFinished(List<Long> billIdlist) {
                return ParkChargingFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<List<OccupyFeeBillDataListVO>> getChargeBillDataListByNoFinished(List<Long> billIdlist) {
                return ParkChargingFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<OccupyFeeBillDataListVO> geOccupancyFeeTerminalData(Long billId) {
                return ParkChargingFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<List<SpcOccupyFeeBillExcelVo>> exportOccupyFeeOrderData(List<Long> billIdList) {
                return ParkChargingFeignFallbackUtils.printLogAndReturn(throwable);
            }


        };
    }

}
