puzhibing
2024-12-26 8c83fad498da51773d4aa6a4aa6af13f8e39e27d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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.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());
            }
        };
    }
}