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

import com.yuchen.saas.payment.api.dto.CommonBaseDTO;
import com.yuchen.saas.payment.api.dto.wallet.*;
import com.yuchen.saas.payment.api.entity.PmgBatParkPayUserWalletBill;
import com.yuchen.saas.payment.api.util.PayFeignFallbackUtils;
import com.yuchen.saas.payment.api.vo.wallet.*;
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 ParkPayUserWalletFeignFallback implements FallbackFactory<ParkPayUserWalletFeign> {

    @Override
    public ParkPayUserWalletFeign create(Throwable throwable) {
        return new ParkPayUserWalletFeign() {
            @Override
            public R<NestPage<UserWalletBillInfoVO>> findPageUserWalletBillInfo(PageUserWalletBillReqDTO reqDTO) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<UserWalletBillCountVO> getUserWalletBillCount(PageUserWalletBillReqDTO reqDTO) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<PmgBatParkPayUserWalletBill> createUserWalletBillData(CreateUserWalletBillReqDTO reqDTO) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<UserWalletRefundVO> startUserWalletRefund(Long walletId) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

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

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

            @Override
            public R<UserWalletInfoVO> createUserWalletInfo(CommonBaseDTO baseDTO) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<UserWalletInfoVO> getUserWalletInfo() {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<NestPage<UserWalletInfoListVO>> findPageUserWalletInfoList(PageUserWalletReqDTO reqDTO) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<UserWalletInfoListVO> getUserWalletInfoById(Long walletId) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }

            @Override
            public R<UserWalletInfoVO> getUserWalletInfoByUserDetailId(Long userDetailId) {
                return PayFeignFallbackUtils.printLogAndReturn(throwable);
            }
        };
    }
}
