Pu Zhibing
2025-04-04 3d4eeb82dd61f8951616dece2425e870116bc23d
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
package com.ruoyi.dataInterchange.api.factory;
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.dataInterchange.api.feignClient.UPWarnMsgAdptInfoClient;
import com.ruoyi.dataInterchange.api.vo.UPWarnMsgAdptInfoVo;
import org.springframework.cloud.openfeign.FallbackFactory;
 
import java.util.List;
 
/**
 * @author zhibing.pu
 * @Date 2025/4/2 10:30
 */
public class UPWarnMsgAdptInfoClientFallbackFactory implements FallbackFactory<UPWarnMsgAdptInfoClient> {
    @Override
    public UPWarnMsgAdptInfoClient create(Throwable cause) {
        return new UPWarnMsgAdptInfoClient() {
            
            @Override
            public R<List<UPWarnMsgAdptInfoVo>> findByCreateTimeAfter(Long createTime) {
                return R.fail("查询大于给定日期的所有报警数据失败:" + cause.getMessage());
            }
        };
    }
}