package cn.estsh.i3plus.ext.mes.icloud.sdkfallback;

import cn.estsh.i3plus.ext.mes.icloud.sdk.ICoreSysUserExtCloud;
import cn.estsh.i3plus.pojo.base.bean.BaseFallBackBean;
import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Description : 获取平台用户信息ext
 * @Reference :
 * @Author : jiaqi.hou
 * @CreateDate : 2023-08-24 16:50
 * @Modify:
 **/
@Component
public class CoreSysUserExtFallbackFactory extends BaseFallBackBean implements FallbackFactory<ICoreSysUserExtCloud> {
    @Override
    public ICoreSysUserExtCloud create(Throwable cause) {
        return new ICoreSysUserExtCloud() {
            @Override
            public BaseResultBean queryUserInOrg(String organizeCode) {
                return makeBaseFallBack("微服调用出错",cause);
            }
        };
    }
}
