修复更新通道状态回复不准的问题
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user