package com.yuchen.saas.payment.api.feign;

import com.yuchen.saas.payment.api.dto.AuditMoreOrderRefundReqDTO;
import com.yuchen.saas.payment.api.dto.CreateMoreOrderRefundReqDTO;
import com.yuchen.saas.payment.api.dto.PageMoreOrderRefundRecordReqDTO;
import com.yuchen.saas.payment.api.dto.PageMoreOrderRefundReqDTO;
import com.yuchen.saas.payment.api.util.PayFeignFallbackUtils;
import com.yuchen.saas.payment.api.vo.moreOrderRefund.PmgBatParkPayMoreOrderRefundDetailVO;
import com.yuchen.saas.payment.api.vo.moreOrderRefund.PmgBatParkPayMoreOrderRefundRecordVO;
import com.yuchen.saas.payment.api.vo.moreOrderRefund.PmgBatParkPayMoreOrderRefundVO;
import feign.hystrix.FallbackFactory;
import org.nest.springwrap.core.mp.support.NestPage;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.stereotype.Component;


@Component
public class ParkPayMoreOrderRefundFeignFallback implements FallbackFactory<ParkPayMoreOrderRefundFeign> {

    @Override
    public ParkPayMoreOrderRefundFeign create(Throwable throwable) {
        return new ParkPayMoreOrderRefundFeign() {

            @Override
            public R<NestPage<PmgBatParkPayMoreOrderRefundVO>> pageMoreOrderRefundList(PageMoreOrderRefundReqDTO reqDTO) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<PmgBatParkPayMoreOrderRefundDetailVO> getMoreOrderRefundDetail(Long id) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<Boolean> createMoreOrderRefund(CreateMoreOrderRefundReqDTO reqDTO) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<Boolean> auditMoreOrderRefund(AuditMoreOrderRefundReqDTO reqDTO) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<NestPage<PmgBatParkPayMoreOrderRefundRecordVO>> pageMoreOrderRefundRecordList(PageMoreOrderRefundRecordReqDTO reqDTO) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public byte[] exportMoreOrderRefundRecordList(PageMoreOrderRefundRecordReqDTO reqDTO) {
                return new byte[0];
            }

        };
    }
}
