From 7d1116c8928770cd7703c83955d77f1e6a430ce3 Mon Sep 17 00:00:00 2001
From: mk1990 <37614016+mk1990@users.noreply.github.com>
Date: 星期四, 21 四月 2022 13:34:50 +0800
Subject: [PATCH] Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0

---
 src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java
index cbcb4ff..95d2843 100644
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java
@@ -164,12 +164,13 @@
 			logger.debug("璁惧閫氶亾淇℃伅鍚屾API璋冪敤锛宒eviceId锛�" + 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);

--
Gitblit v1.8.0