From 92a25393f38d9877aeefca3bcc0f6574b7dff6d4 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 17 十月 2023 17:55:40 +0800
Subject: [PATCH] 基于新的云端录像实现页面功能

---
 src/main/java/com/genersoft/iot/vmp/storager/dao/CloudRecordServiceMapper.java |   35 +++++++++++++++++++++++++++++------
 1 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/CloudRecordServiceMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/CloudRecordServiceMapper.java
index 10595ef..49ba89e 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/dao/CloudRecordServiceMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/CloudRecordServiceMapper.java
@@ -42,17 +42,40 @@
 
     @Select(" <script>" +
             "select * " +
-            "from wvp_cloud_record " +
-            "where 0 = 0" +
+            " from wvp_cloud_record " +
+            " where 0 = 0" +
+            " <if test='query != null'> AND (app LIKE concat('%',#{query},'%') OR stream LIKE concat('%',#{query},'%') )</if> " +
             " <if test= 'app != null '> and app=#{app}</if>" +
             " <if test= 'stream != null '> and stream=#{stream}</if>" +
-            " <if test= 'startTimeStamp != null '> and start_time &gt;= #{startTimeStamp}</if>" +
-            " <if test= 'endTimeStamp != null '> and end_time &lt;= #{endTimeStamp}</if>" +
+            " <if test= 'startTimeStamp != null '> and end_time &gt;= #{startTimeStamp}</if>" +
+            " <if test= 'endTimeStamp != null '> and start_time &lt;= #{endTimeStamp}</if>" +
+            " <if test= 'callId != null '> and call_id = #{callId}</if>" +
+            " <if test= 'mediaServerItemList != null  ' > and media_server_id in " +
+            " <foreach collection='mediaServerItemList'  item='item'  open='(' separator=',' close=')' > #{item.id}</foreach>" +
+            " </if>" +
+            " order by start_time DESC" +
+
+            " </script>")
+    List<CloudRecordItem> getList(@Param("query") String query, @Param("app") String app, @Param("stream") String stream,
+                                  @Param("startTimeStamp")Long startTimeStamp, @Param("endTimeStamp")Long endTimeStamp,
+                                  @Param("callId")String callId, List<MediaServerItem> mediaServerItemList);
+
+
+    @Select(" <script>" +
+            "select file_path" +
+            " from wvp_cloud_record " +
+            " where 0 = 0" +
+            " <if test= 'app != null '> and app=#{app}</if>" +
+            " <if test= 'stream != null '> and stream=#{stream}</if>" +
+            " <if test= 'startTimeStamp != null '> and end_time &gt;= #{startTimeStamp}</if>" +
+            " <if test= 'endTimeStamp != null '> and start_time &lt;= #{endTimeStamp}</if>" +
+            " <if test= 'callId != null '> and call_id = #{callId}</if>" +
             " <if test= 'mediaServerItemList != null  ' > and media_server_id in " +
             " <foreach collection='mediaServerItemList'  item='item'  open='(' separator=',' close=')' > #{item.id}</foreach>" +
             " </if>" +
             " </script>")
-    List<CloudRecordItem> getList(@Param("app") String app, @Param("stream") String stream,
+    List<String> queryRecordFilePathList(@Param("app") String app, @Param("stream") String stream,
                                   @Param("startTimeStamp")Long startTimeStamp, @Param("endTimeStamp")Long endTimeStamp,
-                                  List<MediaServerItem> mediaServerItemList);
+                                  @Param("callId")String callId, List<MediaServerItem> mediaServerItemList);
+
 }

--
Gitblit v1.8.0