G2X81FeignFallBackFactory.java 819 字节
package com.sy.service.feigin;

import com.sy.model.LockFeignResponse;
import com.sy.model.NoticeLock;
import com.sy.response.ResultJson;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author mrz
 */
@Component
@Slf4j
public class G2X81FeignFallBackFactory implements FallbackFactory<G2X81FeignService> {

    @Override
    public G2X81FeignService create(Throwable throwable) {
        log.error("调用金二X81通知接口异常",throwable);
        return new G2X81FeignService() {
            @Override
            public ResultJson send(String message) {
                return new ResultJson("400","金二X81申报接口访问失败");
            }
        };
    }
}