package com.yida.data.mall.fallback;

import com.yida.data.common.core.annotation.Fallback;
import com.yida.data.common.core.common.ResultBean;
import com.yida.data.mall.feign.RemoteBillOrderService;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

/**
 * RemoteBillOrderService fallback处理类
 *
 * @author ZYJ
 * @date 2022/8/26
 */
@Slf4j
@Fallback
public class RemoteBillOrderServiceFallback implements FallbackFactory<RemoteBillOrderService> {

    @Override
    public RemoteBillOrderService create(Throwable throwable) {
        log.error("RemoteBillOrderService fallback reason:{}", throwable.getMessage());

        return new RemoteBillOrderService() {
            /**
             * 更新超时账单订单状态
             *
             * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
             * @author ZYJ
             * @date 2022/4/14 10:27
             */
            @Override
            public ResultBean<String> updateBillOrderStatus() {
                return null;
            }

            /**
             * 更新退款订单状态
             *
             * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
             * @author ZYJ
             * @date 2022/4/14 10:29
             */
            @Override
            public ResultBean<String> updateRefundStatus() {
                return null;
            }
        };
    }
}
