From 9f0ef439cc292e6f5159d02213dd90957562d83e Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期六, 07 五月 2022 15:21:48 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wvp-28181-2.0' into commercial
---
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java | 34 +++++++++++++++-------------------
1 files changed, 15 insertions(+), 19 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 95d2843..d6e614d 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
@@ -6,10 +6,8 @@
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
import com.genersoft.iot.vmp.gb28181.bean.SubscribeHolder;
import com.genersoft.iot.vmp.gb28181.bean.SyncStatus;
-import com.genersoft.iot.vmp.gb28181.event.DeviceOffLineDetector;
import com.genersoft.iot.vmp.gb28181.task.ISubscribeTask;
import com.genersoft.iot.vmp.gb28181.task.impl.CatalogSubscribeTask;
-import com.genersoft.iot.vmp.gb28181.task.impl.MobilePositionSubscribeHandlerTask;
import com.genersoft.iot.vmp.gb28181.task.impl.MobilePositionSubscribeTask;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
@@ -17,14 +15,12 @@
import com.genersoft.iot.vmp.service.IDeviceService;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
-import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree;
import com.genersoft.iot.vmp.vmanager.bean.WVPResult;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
-import org.kxml2.wap.wv.WV;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -57,9 +53,6 @@
@Autowired
private DeferredResultHolder resultHolder;
-
- @Autowired
- private DeviceOffLineDetector offLineDetector;
@Autowired
private IDeviceService deviceService;
@@ -131,12 +124,14 @@
@ApiImplicitParam(name="query", value = "鏌ヨ鍐呭" ,dataTypeClass = String.class),
@ApiImplicitParam(name="online", value = "鏄惁鍦ㄧ嚎" ,dataTypeClass = Boolean.class),
@ApiImplicitParam(name="channelType", value = "璁惧/瀛愮洰褰�-> false/true" ,dataTypeClass = Boolean.class),
+ @ApiImplicitParam(name="catalogUnderDevice", value = "鏄惁鐩村睘涓庤澶囩殑鐩綍" ,dataTypeClass = Boolean.class),
})
public ResponseEntity<PageInfo> channels(@PathVariable String deviceId,
int page, int count,
@RequestParam(required = false) String query,
@RequestParam(required = false) Boolean online,
- @RequestParam(required = false) Boolean channelType) {
+ @RequestParam(required = false) Boolean channelType,
+ @RequestParam(required = false) Boolean catalogUnderDevice) {
// if (logger.isDebugEnabled()) {
// logger.debug("鏌ヨ瑙嗛璁惧閫氶亾API璋冪敤");
// }
@@ -144,7 +139,7 @@
query = null;
}
- PageInfo pageResult = storager.queryChannelsByDeviceId(deviceId, query, channelType, online, page, count);
+ PageInfo pageResult = storager.queryChannelsByDeviceId(deviceId, query, channelType, online, catalogUnderDevice, page, count);
return new ResponseEntity<>(pageResult,HttpStatus.OK);
}
@@ -235,7 +230,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")
@@ -244,7 +239,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()) {
@@ -311,9 +306,15 @@
if (device != null && device.getDeviceId() != null) {
Device deviceInStore = storager.queryVideoDevice(device.getDeviceId());
- if (!StringUtils.isEmpty(device.getName())) deviceInStore.setName(device.getName());
- if (!StringUtils.isEmpty(device.getCharset())) deviceInStore.setCharset(device.getCharset());
- if (!StringUtils.isEmpty(device.getMediaServerId())) deviceInStore.setMediaServerId(device.getMediaServerId());
+ if (!StringUtils.isEmpty(device.getName())) {
+ deviceInStore.setName(device.getName());
+ }
+ if (!StringUtils.isEmpty(device.getCharset())) {
+ deviceInStore.setCharset(device.getCharset());
+ }
+ if (!StringUtils.isEmpty(device.getMediaServerId())) {
+ deviceInStore.setMediaServerId(device.getMediaServerId());
+ }
// 鐩綍璁㈤槄鐩稿叧鐨勪俊鎭�
if (device.getSubscribeCycleForCatalog() > 0) {
@@ -450,11 +451,6 @@
return result;
}
- @GetMapping("/{deviceId}/tree")
- @ApiOperation(value = "閫氶亾鏍戝舰缁撴瀯", notes = "閫氶亾鏍戝舰缁撴瀯")
- public WVPResult<List<DeviceChannelTree>> tree(@PathVariable String deviceId) {
- return WVPResult.Data(storager.tree(deviceId));
- }
@GetMapping("/{deviceId}/sync_status")
@ApiOperation(value = "鑾峰彇閫氶亾鍚屾杩涘害", notes = "鑾峰彇閫氶亾鍚屾杩涘害")
--
Gitblit v1.8.0