package com.jeeplus.flowable.factory;

import com.jeeplus.flowable.feign.IJyProjectApi;
import com.jeeplus.flowable.feign.IJyUserApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class IJyUserApiFallbackFactory implements FallbackFactory<IJyUserApi> {
    @Override
    public IJyUserApi create(Throwable cause) {
        log.error ( "嘉溢项目服务调用失败:{}", cause.getMessage ( ) );
        return new IJyUserApi() {

            @Override
            public String getList() {
                return null;
            }

            @Override
            public String updateUserById(String id, String loginFlag) {
                return null;
            }
        };
    }
}
