From d7bfd9bfa7af26d6c76fe771bb8cfe0d3f84da5e Mon Sep 17 00:00:00 2001
From: 648540858 <456panlinlin>
Date: 星期四, 21 四月 2022 10:30:46 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wvp-28181-2.0' into map

---
 src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 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..38cbdee 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);
@@ -234,7 +235,7 @@
 			@ApiImplicitParam(name="page", value = "褰撳墠椤�", required = true, dataTypeClass = Integer.class),
 			@ApiImplicitParam(name="count", value = "姣忛〉鏉℃暟", required = true, dataTypeClass = Integer.class),
 			@ApiImplicitParam(name="query", value = "鏌ヨ鍐呭", dataTypeClass = String.class),
-			@ApiImplicitParam(name="online", value = "鏄惁鍦ㄧ嚎", dataTypeClass = String.class),
+			@ApiImplicitParam(name="online", value = "鏄惁鍦ㄧ嚎", dataTypeClass = Boolean.class),
 			@ApiImplicitParam(name="channelType", value = "閫氶亾绫诲瀷锛� 瀛愮洰褰�", dataTypeClass = Boolean.class),
 	})
 	@GetMapping("/sub_channels/{deviceId}/{channelId}/channels")
@@ -243,7 +244,7 @@
 												  int page,
 												  int count,
 												  @RequestParam(required = false) String query,
-												  @RequestParam(required = false) String online,
+												  @RequestParam(required = false) Boolean online,
 												  @RequestParam(required = false) Boolean channelType){
 
 //		if (logger.isDebugEnabled()) {

--
Gitblit v1.8.0