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.RemoteBillStatisticsService;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

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

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

        return new RemoteBillStatisticsService() {
            /**
             * 更新缴费统计数据
             *
             * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
             * @author ZYJ
             * @date 2022/7/28 17:07
             */
            @Override
            public ResultBean<String> updateBillStatistics() {
                return null;
            }

            /**
             * 更新缴费账单明细数据
             *
             * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
             * @author ZYJ
             * @date 2022/10/11 14:23
             */
            @Override
            public ResultBean<String> updateBillPayDetail() {
                return null;
            }
        };
    }
}
