package com.ruoyi.other.api.factory; import com.ruoyi.common.core.domain.R; import com.ruoyi.other.api.domain.ShopPoint; import com.ruoyi.other.api.domain.ShopPointCopy; import com.ruoyi.other.api.feignClient.ShopPointClient; import org.springframework.cloud.openfeign.FallbackFactory; import java.util.List; /** * @author zhibing.pu * @Date 2024/12/26 15:58 */ public class ShopPointClientFallbackFactory implements FallbackFactory { @Override public ShopPointClient create(Throwable cause) { return new ShopPointClient(){ @Override public void saveShopPoint(ShopPoint shopPoint) { R.fail("保存门店积分流水失败:" + cause.getMessage()); } @Override public void saveShopPointCopy(ShopPointCopy shopPoint) { R.fail("保存门店积分流水失败:" + cause.getMessage()); } @Override public void deleteShopPointCopy(Long orderId, List type) { } @Override public void deleteShopPointCopyByIds(List ids) { } @Override public R> getShopPointCopy(Long orderId, List type) { return R.fail("获取门店积分流水失败:" + cause.getMessage()); } }; } }