Commit 73b881bcd12558a5fe3dff589d236f458b921148

Authored by 芯火源
1 parent dfb25017

fix: 摄像头点播,验证设备是否在线

... ... @@ -65,6 +65,9 @@ public class TkVideoControlServiceImpl implements TkVideoControlService {
65 65 String tenantId = currentUser.getCurrentTenantId();
66 66 // 判断设备、通道是否存在
67 67 DeviceDTO deviceDTO = tkDeviceService.checkDeviceByTenantIdAndId(tenantId, deviceId, true);
  68 + if (null == deviceDTO || !DeviceState.ONLINE.equals(deviceDTO.getDeviceState())) {
  69 + throw new TkDataValidationException(ErrorMessage.DEVICE_NOT_ONLINE.getMessage());
  70 + }
68 71 SipDeviceDTO sipDeviceDTO =
69 72 JacksonUtil.convertValue(
70 73 deviceDTO.getDeviceInfo().get(FastIotConstants.DeviceAdditional.SIP),
... ...