package com.ruoyi.other.api.factory;
|
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.other.api.domain.GoodsEvaluate;
|
import com.ruoyi.other.api.feignClient.GoodsEvaluateClient;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
|
/**
|
* @author zhibing.pu
|
* @Date 2024/11/27 19:57
|
*/
|
@Slf4j
|
public class GoodsEvaluateClientFallbackFactory implements FallbackFactory<GoodsEvaluateClient> {
|
|
|
@Override
|
public GoodsEvaluateClient create(Throwable cause) {
|
return new GoodsEvaluateClient(){
|
@Override
|
public R<Long> getEvaluateIdByOrderId( Long orderId) {
|
return R.fail("根据订单id获取评论id失败:" + cause.getMessage());
|
}
|
};
|
}
|
}
|