package jnpf.cultivate.fallback;

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

@Slf4j
@Component
public class V2CultivateOldDealApiFallback implements FallbackFactory<V2CultivateOldDealApi> {

    @Override
    public V2CultivateOldDealApi create(Throwable cause) {
        cause.printStackTrace();
        return new V2CultivateOldDealApi() {
            @Override
            public ActionResult<Boolean> dealOldData(String tenantId) {
                return null;
            }

            @Override
            public ActionResult<Boolean> identifyDealOldData(String tenantId) {
                return null;
            }

            @Override
            public ActionResult<String> migrateOldTaskData(String tenantId) {
                return null;
            }

            @Override
            public ActionResult<String> migratePromotionOldData(String tenantId, String promotionId) {
                return null;
            }

        };
    }
}
