yyy
2026-04-17 8dfdb343364a6d8f87f8095a3fd899f6541c8be3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.xiaopeng.api.factory.account;
 
 
import com.xiaopeng.api.feignClient.account.SysRoleClient;
import com.xiaopeng.api.model.account.SysRole;
import com.xiaopeng.common.core.domain.R;
import org.springframework.cloud.openfeign.FallbackFactory;
 
public class SysRoleClientFallbackFactory implements FallbackFactory<SysRoleClient> {
    @Override
    public SysRoleClient create(Throwable cause) {
        return new SysRoleClient(){
 
            @Override
            public R<SysRole> getRoleById(Long id) {
                return R.fail("获取角色信息失败");
            }
        };
    }
}