package com.yuchen.saas.message.api.feign.ue4;


import com.yuchen.saas.message.api.param.MessageParam;;
import org.nest.springwrap.core.tool.api.R;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Author: 肖润飞
 * @CreateTime: 2022/11/16 11:40
 * @Description: TODO
 * @Version: 1.0
 */
@Component
public class UE4MessageFeignFallback implements FallbackFactory<UE4MessageFeignServer> {

    @Override
    public UE4MessageFeignServer create(Throwable cause) {
        return new UE4MessageFeignServer() {

            @Override
            public R sendMessage(MessageParam param) {
                return R.fail("远程调用失败");
            }
        };
    }
}