From c5320fbf7fd671ba7ccefe66e951edeebb4252b2 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Tue, 26 Sep 2023 16:24:51 +0800
Subject: [PATCH] 媒体模块

---
 src/main/java/com/dji/sample/manage/controller/DeviceController.java |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/dji/sample/manage/controller/DeviceController.java b/src/main/java/com/dji/sample/manage/controller/DeviceController.java
index 9fcc72d..ccd2b64 100644
--- a/src/main/java/com/dji/sample/manage/controller/DeviceController.java
+++ b/src/main/java/com/dji/sample/manage/controller/DeviceController.java
@@ -85,6 +85,20 @@
         return ResponseResult.success(devicesList);
     }
 
+    @GetMapping("/{device_sn}/subscribeTopic")
+    public ResponseResult<List<DeviceDTO>> testBinding(@PathVariable("device_sn") String deviceSn) {
+        deviceService.subscribeTopicOnline(deviceSn);
+
+        return ResponseResult.success();
+    }
+
+    @GetMapping("/{device_sn}/unsubscribeTopic")
+    public ResponseResult<List<DeviceDTO>> testUnBinding(@PathVariable("device_sn") String deviceSn) {
+        deviceService.unsubscribeTopicOffline(deviceSn);
+
+        return ResponseResult.success();
+    }
+
     /**
      * After binding the device to the workspace, the device data can only be seen on the web.
      * @param device

--
Gitblit v1.9.3