Pu Zhibing
2025-02-25 49e96cc15baf35d710fe3a049fb97aff6a1af132
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.ruoyi.other.api.factory;
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.ShopGiveawayTemporary;
import com.ruoyi.other.api.feignClient.ShopGiveawayTemporaryClient;
import org.springframework.cloud.openfeign.FallbackFactory;
 
import java.util.List;
/**
 * @author zhibing.pu
 * @Date 2025/2/25 16:12
 */
public class ShopGiveawayTemporaryClientFallbackFactory implements FallbackFactory<ShopGiveawayTemporaryClient> {
@Override
    public ShopGiveawayTemporaryClient create(Throwable cause) {
        return new ShopGiveawayTemporaryClient(){
        
            @Override
            public R saveShopGiveawayTemporary(ShopGiveawayTemporary shopGiveawayTemporary) {
                return R.fail("保存门店分佣临时数据失败:" + cause.getMessage());
            }
            
            @Override
            public R<List<ShopGiveawayTemporary>> getShopGiveawayTemporary(Long orderId) {
                return R.fail("获取订单相关门店分佣临时数据失败:" + cause.getMessage());
            }
        };
    }
}