phpcjl
2024-12-13 1fcde5c9904e1c4a377586046e610dbf2ac3e4b3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.ruoyi.system.api.factory;
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.SysLoginLog;
import com.ruoyi.system.api.feignClient.SysLoginLogClient;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
 
@Component
public class SysLoginLogFallbackFactory implements FallbackFactory<SysLoginLogClient> {
    @Override
    public SysLoginLogClient create(Throwable cause) {
        return new SysLoginLogClient(){
    
    
            @Override
            public R saveLoginLog(SysLoginLog loginLog) {
                return R.fail("添加登录日志失败!" + cause.getMessage());
            }
        };
    }
}