Pu Zhibing
2025-01-23 792cbb986fb8c32f6bbc1638c4ae264372e7a28f
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
package com.ruoyi.order.api.factory;
 
import com.ruoyi.order.api.feignClient.ShoppingOrderClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
 
 
/**
 * 充电订单服务降级处理
 *
 * @author ruoyi
 */
@Component
public class ShoppingOrderFallbackFactory implements org.springframework.cloud.openfeign.FallbackFactory<ShoppingOrderClient> {
    private static final Logger log = LoggerFactory.getLogger(ShoppingOrderFallbackFactory.class);
    
    
    @Override
    public ShoppingOrderClient create(Throwable cause) {
        log.error("调用失败:{}", cause.getMessage());
        return new ShoppingOrderClient() {
            
            
            @Override
            public void cancelShoppingOrderWxRefund(String out_refund_no, String refund_id, String tradeState, String success_time) {
                log.error("商城订单去掉退款回调通知失败:" + cause.getMessage());
            }
        };
    }
}