DeviceLocationFallbackImpl.java
991 Bytes
package cn.com.glsx.stdinterface.fallback;
import cn.com.glsx.stdinterface.api.DeviceLocationClient;
import cn.com.glsx.stdinterface.dto.DeviceLocationDto;
import com.glsx.plat.core.web.R;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.Collection;
import java.util.List;
/**
* 设备上点服务异常处理实现类
*
* @author yll
*/
@Slf4j
@Component
public class DeviceLocationFallbackImpl implements DeviceLocationClient {
@Setter
private Throwable cause;
@Override
public R<Integer> saveOrUpdateDeviceLocationData(Collection<DeviceLocationDto> deviceLocationDtos) {
log.warn("saveOrUpdateDeviceLocationData===熔断啦 {}", cause.getMessage());
return R.ok("服务异常");
}
@Override
public R<List<String>> getAllSnInNewEshield() {
log.warn("getAllSnInNewEshield===熔断啦 {}", cause.getMessage());
return R.ok("服务异常");
}
}