From 7aa8444e676775a4541498a3c13ccc25546d2344 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 13 十月 2023 18:25:36 +0800
Subject: [PATCH] 临时提交

---
 src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java |   38 +++++++++++++++++++++++++++++---------
 1 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java
index 0f37a7d..0d79675 100755
--- a/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java
+++ b/src/main/java/com/genersoft/iot/vmp/vmanager/cloudRecord/CloudRecordController.java
@@ -7,10 +7,12 @@
 import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
 import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
 import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
+import com.genersoft.iot.vmp.service.ICloudRecordService;
 import com.genersoft.iot.vmp.service.IMediaServerService;
+import com.genersoft.iot.vmp.service.bean.CloudRecordItem;
 import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
-import com.genersoft.iot.vmp.vmanager.bean.PageInfo;
 import com.genersoft.iot.vmp.vmanager.bean.RecordFile;
+import com.github.pagehelper.PageInfo;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -41,7 +43,7 @@
     private final static Logger logger = LoggerFactory.getLogger(CloudRecordController.class);
 
     @Autowired
-    private ZlmHttpHookSubscribe hookSubscribe;
+    private ICloudRecordService cloudRecordService;
 
     @Autowired
     private IMediaServerService mediaServerService;
@@ -95,7 +97,7 @@
             return new ArrayList<>();
         }
 
-        return mediaServerService.getRecordDates(app, stream, year, month, mediaServerItems);
+        return cloudRecordService.getDateList(app, stream, year, month, mediaServerItems);
     }
 
     @ResponseBody
@@ -108,7 +110,7 @@
     @Parameter(name = "startTime", description = "寮�濮嬫椂闂�(yyyy-MM-dd HH:mm:ss)", required = true)
     @Parameter(name = "endTime", description = "缁撴潫鏃堕棿(yyyy-MM-dd HH:mm:ss)", required = true)
     @Parameter(name = "mediaServerId", description = "娴佸獟浣揑D锛岀疆绌哄垯鏌ヨ鍏ㄩ儴娴佸獟浣�", required = false)
-    public PageInfo<RecordFile> openRtpServer(
+    public PageInfo<CloudRecordItem> openRtpServer(
             @RequestParam String app,
             @RequestParam String stream,
             @RequestParam int page,
@@ -133,13 +135,31 @@
             mediaServerItems = mediaServerService.getAll();
         }
         if (mediaServerItems.isEmpty()) {
-            return new PageInfo<>();
+            throw new ControllerException(ErrorCode.ERROR100.getCode(), "褰撳墠鏃犳祦濯掍綋");
         }
-        List<RecordFile> records = mediaServerService.getRecords(app, stream, startTime, endTime, mediaServerItems);
-        PageInfo<RecordFile> pageInfo = new PageInfo<>(records);
-        pageInfo.startPage(page, count);
-        return pageInfo;
+        return cloudRecordService.getList(page, count, app, stream, startTime, endTime, mediaServerItems);
     }
 
+    @ResponseBody
+    @GetMapping("/task/add")
+    @Operation(summary = "娣诲姞鍚堝苟浠诲姟")
+    @Parameter(name = "app", description = "搴旂敤鍚�", required = true)
+    @Parameter(name = "stream", description = "娴両D", required = true)
+    @Parameter(name = "startTime", description = "閴存潈ID", required = false)
+    @Parameter(name = "endTime", description = "閴存潈ID", required = false)
+    @Parameter(name = "callId", description = "閴存潈ID", required = false)
+    @Parameter(name = "remoteHost", description = "杩斿洖鍦板潃鏃剁殑杩滅▼鍦板潃", required = false)
+    public String addTask(
+            @RequestParam String app,
+            @RequestParam String stream,
+            @RequestParam String startTime,
+            @RequestParam String endTime,
+            @RequestParam String callId,
+            @RequestParam String remoteHost
+    ){
+        return cloudRecordService.addTask(app, stream, startTime, endTime, callId, remoteHost);
+    }
+
+
 
 }

--
Gitblit v1.8.0