DeviceActiveFallbackImpl.java
871 Bytes
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<List<String>> getUnActiveInfoSnList() {
log.warn("getUnActiveSnList 熔断啦 {}", cause.getMessage());
return R.ok("服务异常");
}
}