luofl
2025-02-24 199861555473ab50f2fafa3d58e42e64e838c039
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
30
31
32
33
34
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;
 
/**
 * @author zhibing.pu
 * @Date 2024/12/26 15:58
 */
public class ShopPointClientFallbackFactory implements FallbackFactory<ShopPointClient> {
    @Override
    public ShopPointClient create(Throwable cause) {
        return new ShopPointClient(){
            
            @Override
            public void saveShopPoint(ShopPoint shopPoint) {
                R.fail("保存门店积分流水失败:" + cause.getMessage());
            }
 
            @Override
            public void saveShopPoint(ShopPointCopy shopPoint) {
                R.fail("保存门店积分流水失败:" + cause.getMessage());
            }
 
            @Override
            public void deleteShopPointCopy(Long orderId) {
 
            }
        };
    }
}