package org.springblade.system.client.factory;

import java.util.List;

import org.springblade.system.client.SubscribeNotifyConfClient;
import org.springblade.system.client.model.VisualSubscribeNotifyConfModel;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Component
public class SubscribeNotifyConfFallbackFactory implements FallbackFactory<SubscribeNotifyConfClient> {

    @Override
    public SubscribeNotifyConfClient create(Throwable cause) {
        log.error("SubscribeNotifyConfClient invoke fallback:{}", cause.getMessage());
        return new SubscribeNotifyConfClient() {

            @Override
            public List<VisualSubscribeNotifyConfModel> notifyConfList(Integer notifyType) {
                return null;
            }
            @Override
            public List<VisualSubscribeNotifyConfModel> newNotifyConfList(String tenantId,Integer notifyType) {
                return null;
            }
        };
    }
}
