From 3884e9a56aeab7ac2ad7c9483059adc0df6683d9 Mon Sep 17 00:00:00 2001
From: jiang <893224616@qq.com>
Date: 星期三, 07 九月 2022 15:56:48 +0800
Subject: [PATCH] 1.根据redis消息更新推流列表时同时更新在线状态 2.推流列表的模板增加在线状态
---
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java
index 30320e6..fe363a6 100644
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceControl.java
@@ -56,20 +56,14 @@
@Operation(summary = "杩滅▼鍚姩鎺у埗鍛戒护")
@Parameter(name = "deviceId", description = "璁惧鍥芥爣缂栧彿", required = true)
@GetMapping("/teleboot/{deviceId}")
- public String teleBootApi(@PathVariable String deviceId) {
+ public void teleBootApi(@PathVariable String deviceId) {
if (logger.isDebugEnabled()) {
logger.debug("璁惧杩滅▼鍚姩API璋冪敤");
}
Device device = storager.queryVideoDevice(deviceId);
- boolean sucsess = cmder.teleBootCmd(device);
- if (sucsess) {
- JSONObject json = new JSONObject();
- json.put("DeviceID", deviceId);
- json.put("Result", "OK");
- return json.toJSONString();
- } else {
- logger.warn("璁惧杩滅▼鍚姩API璋冪敤澶辫触锛�");
- throw new ControllerException(ErrorCode.ERROR100.getCode(), "璁惧杩滅▼鍚姩API璋冪敤澶辫触锛�");
+ if (!cmder.teleBootCmd(device)) {
+ logger.warn("璁惧杩滅▼鍚姩API璋冪敤澶辫触锛�");
+ throw new ControllerException(ErrorCode.ERROR100);
}
}
--
Gitblit v1.8.0