修复更新通道状态回复不准的问题

This commit is contained in:
648540858
2022-04-18 12:55:54 +08:00
parent 596a633d2e
commit 20622d20d6
5 changed files with 30 additions and 4 deletions

View File

@@ -164,12 +164,13 @@ public class DeviceQuery {
logger.debug("设备通道信息同步API调用deviceId" + deviceId);
}
Device device = storager.queryVideoDevice(deviceId);
SyncStatus syncStatus = deviceService.getChannelSyncStatus(deviceId);
boolean status = deviceService.isSyncRunning(deviceId);
// 已存在则返回进度
if (syncStatus != null && syncStatus.getErrorMsg() == null) {
if (status) {
WVPResult<SyncStatus> wvpResult = new WVPResult<>();
wvpResult.setCode(0);
wvpResult.setData(syncStatus);
SyncStatus channelSyncStatus = deviceService.getChannelSyncStatus(deviceId);
wvpResult.setData(channelSyncStatus);
return wvpResult;
}
deviceService.sync(device);