package jnpf.cultivate.fallback;

import jnpf.cultivate.FtbCultivateLearnTaskListApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class FtbCultivateLearnTaskApiFallback implements FallbackFactory<FtbCultivateLearnTaskListApi> {


    @Override
    public FtbCultivateLearnTaskListApi create(Throwable cause) {
        log.error("进入 FtbCultivateLearnTaskApiFallback 的 fallback，降级原因：", cause); // 打印降级原因

        return new FtbCultivateLearnTaskListApi() {


            @Override
            public void timingAddNewPersonToTaskNew(String tenantId) {

            }

            @Override
            public void timingTaskLearningAlertNew(String tenantId) {

            }
        };
    }
}
