|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @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} and 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 *" + | 
|---|
|  |  |  | " from wvp_cloud_record " + | 
|---|
|  |  |  | " where collect = false and end_time <= #{endTimeStamp} and media_server_id  = #{mediaServerId} " + | 
|---|
|  |  |  | " </script>") | 
|---|
|  |  |  | List<CloudRecordItem> queryRecordListForDelete(@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); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Delete(" <script>" + | 
|---|
|  |  |  | "delete from wvp_cloud_record where id in " + | 
|---|
|  |  |  | " <foreach collection='cloudRecordItemIdList'  item='item'  open='(' separator=',' close=')' > #{item.id}</foreach>" + | 
|---|
|  |  |  | " </script>") | 
|---|
|  |  |  | int deleteList(List<CloudRecordItem> cloudRecordItemIdList); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Select(" <script>" + | 
|---|
|  |  |  | "select *" + | 
|---|
|  |  |  | " from wvp_cloud_record " + | 
|---|
|  |  |  | "where call_id = #{callId}" + | 
|---|
|  |  |  | " </script>") | 
|---|
|  |  |  | List<CloudRecordItem> getListByCallId(@Param("callId") String callId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Select(" <script>" + | 
|---|
|  |  |  | "select *" + | 
|---|
|  |  |  | " from wvp_cloud_record " + | 
|---|
|  |  |  | "where id = #{id}" + | 
|---|
|  |  |  | " </script>") | 
|---|
|  |  |  | CloudRecordItem queryOne(@Param("id") Integer id); | 
|---|
|  |  |  | } | 
|---|