From 5ff2faa5bd1c8f829bb16c27177692eacd7dbd03 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期三, 25 十月 2023 15:02:15 +0800
Subject: [PATCH] 添加日志

---
 src/main/java/com/genersoft/iot/vmp/storager/dao/CloudRecordServiceMapper.java |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 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 49ba89e..5fdf2f5 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
@@ -2,10 +2,7 @@
 
 import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
 import com.genersoft.iot.vmp.service.bean.CloudRecordItem;
-import org.apache.ibatis.annotations.Insert;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.*;
 
 import java.util.List;
 
@@ -78,4 +75,32 @@
                                   @Param("startTimeStamp")Long startTimeStamp, @Param("endTimeStamp")Long endTimeStamp,
                                   @Param("callId")String callId, List<MediaServerItem> mediaServerItemList);
 
+    @Update(" <script>" +
+            "update wvp_cloud_record set collect = #{collect} where file_path in " +
+            " <foreach collection='cloudRecordItemList'  item='item'  open='(' separator=',' close=')' > #{item.filePath}</foreach>" +
+            " </script>")
+    int updateCollectList(@Param("collect") boolean collect, List<CloudRecordItem> cloudRecordItemList);
+
+    @Delete(" <script>" +
+            "delete from wvp_cloud_record where media_server_id=#{mediaServerId} file_path in " +
+            " <foreach collection='filePathList'  item='item'  open='(' separator=',' close=')' > #{item}</foreach>" +
+            " </script>")
+    void deleteByFileList(List<String> filePathList, @Param("mediaServerId") String mediaServerId);
+
+
+    @Select(" <script>" +
+            "select file_path" +
+            " from wvp_cloud_record " +
+            " where collect = false " +
+            " <if test= 'endTimeStamp != null '> and start_time &lt;= #{endTimeStamp}</if>" +
+            " <if test= 'callId != null '> and call_id = #{callId}</if>" +
+            " <if test= 'mediaServerId != null  ' > and media_server_id  = #{mediaServerId} </if>" +
+            " </script>")
+    List<String> queryRecordFilePathListForDelete(@Param("endTimeStamp")Long endTimeStamp, String mediaServerId);
+
+    @Update(" <script>" +
+            "update wvp_cloud_record set collect = #{collect} where id = #{recordId} " +
+            " </script>")
+    int changeCollectById(@Param("collect") boolean collect, @Param("recordId") Integer recordId);
+
 }

--
Gitblit v1.8.0