package com.ruoyi.account.api.factory; import com.ruoyi.account.api.feignClient.AppUserShopClient; import com.ruoyi.account.api.model.AppUserShop; import com.ruoyi.common.core.domain.R; import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.web.bind.annotation.PostMapping; import java.util.List; /** * @author zhibing.pu * @date 2025/1/2 18:50 */ public class AppUserShopClientFallbackFactory implements FallbackFactory { @Override public AppUserShopClient create(Throwable cause) { return new AppUserShopClient(){ @Override public R> getAppUserShop(Long userId) { return R.fail("查询用户门店关系数据失败:" + cause.getMessage()); } @Override public R delAppUserShop(AppUserShop appUserShop) { return R.fail("删除用户门店关系数据失败:" + cause.getMessage()); } @PostMapping("/saveAppUserShop/delAppUserShop") @Override public void saveAppUserShop(AppUserShop appUserShop) { R.fail("保存用户门店关系数据失败:" + cause.getMessage()); } }; } }