From b89f1d3745044fec20c9cfe7a94bdb301d2ae645 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期四, 08 五月 2025 17:47:09 +0800 Subject: [PATCH] Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile into dev --- ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/JianGuanSystemFallbackFactory.java | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/JianGuanSystemFallbackFactory.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/JianGuanSystemFallbackFactory.java new file mode 100644 index 0000000..925e9b4 --- /dev/null +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/JianGuanSystemFallbackFactory.java @@ -0,0 +1,30 @@ +package com.ruoyi.system.api.factory; + +import com.ruoyi.common.core.domain.R; +import com.ruoyi.system.api.feignClient.JianGuanSystemClient; +import com.ruoyi.system.api.vo.GovernmentCloudSystemVO; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + + +/** + * + * @author ruoyi + */ +@Component +public class JianGuanSystemFallbackFactory implements org.springframework.cloud.openfeign.FallbackFactory<JianGuanSystemClient> +{ + private static final Logger log = LoggerFactory.getLogger(JianGuanSystemClient.class); + + @Override + public JianGuanSystemClient create(Throwable throwable) { + log.error("政务云查询数据接口:{}", throwable.getMessage()); + return new JianGuanSystemClient() { + @Override + public R<GovernmentCloudSystemVO> listAll() { + return R.fail("政务云查询数据接口System:" + throwable.getMessage()); + } + }; + } +} -- Gitblit v1.7.1