Pu Zhibing
5 天以前 3244b550596e0330031b3f4547356927df83b0ad
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/VipFallbackFactory.java
@@ -1,12 +1,16 @@
package com.ruoyi.other.api.factory;
import com.ruoyi.account.api.dto.GiveVipDto;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.other.api.domain.TVip;
import com.ruoyi.other.api.feignClient.VipClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.util.List;
/**
 * 会员服务降级处理
@@ -28,6 +32,30 @@
                return R.fail("获取最高抵扣、最低起步价,最高折扣的会员失败:" + throwable.getMessage());
            }
            @Override
            public R<TVip> getInfo(Integer type) {
                return R.fail("获取数据失败:" + throwable.getMessage());
            }
            @Override
            public R giveVip(GiveVipDto giveVipDto) {
                return R.fail("赠送会员:" + throwable.getMessage());
            }
            @Override
            public R<List<TVip>> getVipList() {
                return R.fail("查询会员集合失败:" + throwable.getMessage());
            }
            @Override
            public R<TVip> getInfo1(Integer id) {
                return R.fail("根据会员id 获取会员信息:" + throwable.getMessage());
            }
            @Override
            public R<List<TVip>> getAllVip() {
                return R.fail("获取数据失败:" + throwable.getMessage());
            }
        };
    }
}