无关风月
2025-05-06 25d4e8cb127912e293a593b3469d15079646028e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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());
            }
        };
    }
}