package com.ruoyi.other.api.factory;
|
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.other.api.feignClient.JianGuanOtherClient;
|
import com.ruoyi.other.api.vo.GovernmentCloudOtherVO;
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
import org.springframework.stereotype.Component;
|
|
|
/**
|
*
|
* @author ruoyi
|
*/
|
@Component
|
public class JianGuanOtherFallbackFactory implements org.springframework.cloud.openfeign.FallbackFactory<JianGuanOtherClient>
|
{
|
private static final Logger log = LoggerFactory.getLogger(JianGuanOtherClient.class);
|
|
@Override
|
public JianGuanOtherClient create(Throwable throwable) {
|
log.error("政务云查询数据接口:{}", throwable.getMessage());
|
return new JianGuanOtherClient() {
|
@Override
|
public R<GovernmentCloudOtherVO> listAll() {
|
return R.fail("政务云查询数据接口Other:" + throwable.getMessage());
|
}
|
};
|
}
|
}
|