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;
|
}
|
};
|
}
|
}
|