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

import cn.estsh.i3plus.ext.mes.icloud.sdk.IWmsErpHouseCheckCloud;
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;

@Component
public class WmsErpHouseCheckFallbackFactory extends BaseFallBackBean implements FallbackFactory<IWmsErpHouseCheckCloud> {
    @Override
    public IWmsErpHouseCheckCloud create(Throwable throwable) {
        return new IWmsErpHouseCheckCloud() {
            @Override
            public BaseResultBean getWmsZone(String erpWarehouse, String organizeCode) {
                return makeBaseFallBack("微服调用出错", throwable);
            }
        };
    }
}
