package com.yida.data.school.fallback.smart;

import com.yida.data.common.core.annotation.Fallback;
import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.smart.EduSmartWelcomeGuideRosterRelation;
import com.yida.data.common.core.entity.smart.EduSmartWelcomeGuideStep;
import com.yida.data.school.feign.smart.RemoteSmartWelcomeService;
import com.yida.data.school.feign.transaction.RemoteProductOrderService;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * RemoteSmartWelcomeService fallback处理类
 *
 * @author ZYJ
 * @date 2023/5/17
 */
@Slf4j
@Fallback
public class RemoteSmartWelcomeServiceFallback implements FallbackFactory<RemoteSmartWelcomeService> {

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

        return new RemoteSmartWelcomeService() {

            @Override
            public ResultBean<EduSmartWelcomeGuideRosterRelation> getOpenIdRelation(String openId, Long deptId) {
                return null;
            }

            @Override
            public ResultBean<List<EduSmartWelcomeGuideStep>> listStepInfo(Long relationId, Long guideId) {
                return null;
            }

            @Override
            public ResultBean<String> updateGuideRosterOrderStatus() {
                return null;
            }
        };
    }
}
