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

import cn.estsh.i3plus.ext.mes.icloud.sdk.IWmsPsPartQueryCloud;
import cn.estsh.i3plus.ext.mes.pojo.model.WmsPsCheckModel;
import cn.estsh.i3plus.pojo.base.bean.BaseFallBackBean;
import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
import cn.estsh.i3plus.pojo.base.common.Pager;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

@Component
public class WmsPsPartFallbackFactory extends BaseFallBackBean implements FallbackFactory<IWmsPsPartQueryCloud> {
    @Override
    public IWmsPsPartQueryCloud create(Throwable throwable) {
        return new IWmsPsPartQueryCloud() {
            @Override
            public BaseResultBean queryPsPart(@RequestBody WmsPsCheckModel wmsPsCheckModel) {
                return makeBaseFallBack("微服调用出错", throwable);
            }
        };
    }
}
