liujie
2026-06-09 c96fbe6b0aeb413a17c429133ee6d81d138144b9
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
package com.xiaopeng.api.factory.account;
 
import com.xiaopeng.api.dto.account.ThirdInfoResVo;
import com.xiaopeng.api.dto.account.UserResourcesDto;
import com.xiaopeng.api.feignClient.account.SSOClient;
import com.xiaopeng.api.feignClient.account.ThirdClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
 
 
@Slf4j
@Component
public class ThirdClientFallbackFactory implements FallbackFactory<ThirdClient> {
    @Override
    public ThirdClient create(Throwable cause) {
        return new ThirdClient() {
 
            @Override
            public ThirdInfoResVo thirdInfo(String appId, Long uid, Integer thirdType) {
                log.info("调用小鹏三方授权服务失败, 异常: {}", cause.getMessage());
                return null;
            }
        };
    }
}