DeviceActiveFallbackImpl.java
1.03 KB
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
35
36
37
38
39
40
package cn.com.glsx.stdinterface.fallback;
import cn.com.glsx.stdinterface.api.DeviceActiveClient;
import cn.com.glsx.stdinterface.dto.DeviceActiveDto;
import com.glsx.plat.core.web.R;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author xiangyanlin
* @date 2022/4/12
*/
@Slf4j
@Component
public class DeviceActiveFallbackImpl implements DeviceActiveClient {
@Setter
private Throwable cause;
@Override
public R saveActiveInfo(DeviceActiveDto deviceActiveDto) {
log.warn("saveActiveInfo 熔断啦 {}", cause.getMessage());
return R.ok("服务异常");
}
@Override
public R saveActiveInfoFlush(List<String> snList) {
log.warn("saveActiveInfoFlush 熔断啦 {}", cause.getMessage());
return R.ok("服务异常");
}
@Override
public R<List<String>> getUnActiveInfoSnList() {
log.warn("getUnActiveSnList 熔断啦 {}", cause.getMessage());
return R.ok("服务异常");
}
}