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

import cn.estsh.i3plus.ext.mes.icloud.sdk.ICoreSysPushMessageCloud;
import cn.estsh.i3plus.pojo.base.bean.BaseFallBackBean;
import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
import cn.estsh.i3plus.pojo.model.platform.PushDataNotifyModel;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description : core推送消息微服务调用
 * @Reference :
 * @Author : jiaqi.hou
 * @CreateDate : 2023-08-11 15:25
 * @Modify:
 **/
@Component
public class CoreSysPushMessageFallbackFactory extends BaseFallBackBean implements FallbackFactory<ICoreSysPushMessageCloud> {
    @Override
    public ICoreSysPushMessageCloud create(Throwable cause) {
        return new ICoreSysPushMessageCloud() {
            @Override
            public BaseResultBean pushMessage(@RequestBody PushDataNotifyModel var1) {
                return makeBaseFallBack("微服调用出错",cause);
            }
        };
    }
}
