Commit 1f889a9d91dad56664ec58813962c8d700886af5
1 parent
ee9f55b3
修复数据写入
Showing
3 changed files
with
0 additions
and
82 deletions
src/main/java/top/panll/assist/config/StartConfig.java
| @@ -159,7 +159,6 @@ public class StartConfig implements CommandLineRunner { | @@ -159,7 +159,6 @@ public class StartConfig implements CommandLineRunner { | ||
| 159 | cloudRecordItem.setStartTime(startTimeStamp); | 159 | cloudRecordItem.setStartTime(startTimeStamp); |
| 160 | cloudRecordItem.setEndTime(endTimeStamp); | 160 | cloudRecordItem.setEndTime(endTimeStamp); |
| 161 | cloudRecordItem.setCollect(collect); | 161 | cloudRecordItem.setCollect(collect); |
| 162 | - cloudRecordItem.setReserve(reserve); | ||
| 163 | cloudRecordItem.setMediaServerId(mediaServerId); | 162 | cloudRecordItem.setMediaServerId(mediaServerId); |
| 164 | cloudRecordItem.setFileName(DateUtils.getTimeStr(startTimeStamp) + "-" + dateVideoFileIndexList.get(dataPath).size() + ".mp4"); | 163 | cloudRecordItem.setFileName(DateUtils.getTimeStr(startTimeStamp) + "-" + dateVideoFileIndexList.get(dataPath).size() + ".mp4"); |
| 165 | cloudRecordItem.setFolder(streamFile.getAbsolutePath()); | 164 | cloudRecordItem.setFolder(streamFile.getAbsolutePath()); |
src/main/java/top/panll/assist/dto/CloudRecordItem.java
| @@ -60,10 +60,6 @@ public class CloudRecordItem { | @@ -60,10 +60,6 @@ public class CloudRecordItem { | ||
| 60 | */ | 60 | */ |
| 61 | private Boolean collect; | 61 | private Boolean collect; |
| 62 | 62 | ||
| 63 | - /** | ||
| 64 | - * 保留,收藏的文件不移除 | ||
| 65 | - */ | ||
| 66 | - private Boolean reserve; | ||
| 67 | 63 | ||
| 68 | /** | 64 | /** |
| 69 | * 文件大小 | 65 | * 文件大小 |
| @@ -178,12 +174,4 @@ public class CloudRecordItem { | @@ -178,12 +174,4 @@ public class CloudRecordItem { | ||
| 178 | public void setCollect(Boolean collect) { | 174 | public void setCollect(Boolean collect) { |
| 179 | this.collect = collect; | 175 | this.collect = collect; |
| 180 | } | 176 | } |
| 181 | - | ||
| 182 | - public Boolean getReserve() { | ||
| 183 | - return reserve; | ||
| 184 | - } | ||
| 185 | - | ||
| 186 | - public void setReserve(Boolean reserve) { | ||
| 187 | - this.reserve = reserve; | ||
| 188 | - } | ||
| 189 | } | 177 | } |
src/main/java/top/panll/assist/mapper/CloudRecordServiceMapper.java
| @@ -21,7 +21,6 @@ public interface CloudRecordServiceMapper { | @@ -21,7 +21,6 @@ public interface CloudRecordServiceMapper { | ||
| 21 | " file_path," + | 21 | " file_path," + |
| 22 | " file_size," + | 22 | " file_size," + |
| 23 | " collect," + | 23 | " collect," + |
| 24 | - " reserve," + | ||
| 25 | " time_len ) " + | 24 | " time_len ) " + |
| 26 | "VALUES (" + | 25 | "VALUES (" + |
| 27 | " #{app}," + | 26 | " #{app}," + |
| @@ -35,78 +34,10 @@ public interface CloudRecordServiceMapper { | @@ -35,78 +34,10 @@ public interface CloudRecordServiceMapper { | ||
| 35 | " #{filePath}," + | 34 | " #{filePath}," + |
| 36 | " #{fileSize}," + | 35 | " #{fileSize}," + |
| 37 | " #{collect}," + | 36 | " #{collect}," + |
| 38 | - " #{reserve}," + | ||
| 39 | " #{timeLen})" + | 37 | " #{timeLen})" + |
| 40 | " </script>") | 38 | " </script>") |
| 41 | int add(CloudRecordItem cloudRecordItem); | 39 | int add(CloudRecordItem cloudRecordItem); |
| 42 | 40 | ||
| 43 | - | ||
| 44 | - @Update(" <script>" + | ||
| 45 | - "update wvp_cloud_record set collect = #{collect} where file_path in " + | ||
| 46 | - " <foreach collection='cloudRecordItemList' item='item' open='(' separator=',' close=')' > #{item.filePath}</foreach>" + | ||
| 47 | - " </script>") | ||
| 48 | - void updateCollectList(@Param("collect") boolean collect, List<CloudRecordItem> cloudRecordItemList); | ||
| 49 | - | ||
| 50 | - @Delete(" <script>" + | ||
| 51 | - "delete from wvp_cloud_record where media_server_id=#{mediaServerId} file_path in " + | ||
| 52 | - " <foreach collection='filePathList' item='item' open='(' separator=',' close=')' > #{item}</foreach>" + | ||
| 53 | - " </script>") | ||
| 54 | - void deleteByFileList(List<String> filePathList, @Param("mediaServerId") String mediaServerId); | ||
| 55 | - | ||
| 56 | - | ||
| 57 | - @Select(" <script>" + | ||
| 58 | - "select file_path" + | ||
| 59 | - " from wvp_cloud_record " + | ||
| 60 | - " where collect = false and reserve = false " + | ||
| 61 | - " <if test= 'endTimeStamp != null '> and start_time <= #{endTimeStamp}</if>" + | ||
| 62 | - " <if test= 'callId != null '> and call_id = #{callId}</if>" + | ||
| 63 | - " <if test= 'mediaServerId != null ' > and media_server_id = #{mediaServerId} </if>" + | ||
| 64 | - " </script>") | ||
| 65 | - List<String> queryRecordFilePathListForDelete(@Param("endTimeStamp")Long endTimeStamp, String mediaServerId); | ||
| 66 | - | ||
| 67 | - @Update(" <script>" + | ||
| 68 | - "update wvp_cloud_record set reserve = #{reserve} where file_path in " + | ||
| 69 | - " <foreach collection='cloudRecordItems' item='item' open='(' separator=',' close=')' > #{item.filePath}</foreach>" + | ||
| 70 | - " </script>") | ||
| 71 | - void updateReserveList(@Param("reserve") boolean reserve,List<CloudRecordItem> cloudRecordItems); | ||
| 72 | - | ||
| 73 | - @Update(" <script>" + | ||
| 74 | - "update wvp_cloud_record set collect = #{collect} where id = #{recordId} " + | ||
| 75 | - " </script>") | ||
| 76 | - void changeCollectById(@Param("collect") boolean collect, @Param("recordId") Integer recordId); | ||
| 77 | - | ||
| 78 | - @Update(" <script>" + | ||
| 79 | - "update wvp_cloud_record set reserve = #{reserve} where id = #{recordId} " + | ||
| 80 | - " </script>") | ||
| 81 | - void changeReserveById(@Param("reserve") boolean reserve, Integer recordId); | ||
| 82 | - | ||
| 83 | - | ||
| 84 | - @Insert("<script> " + | ||
| 85 | - "insert into wvp_cloud_record " + | ||
| 86 | - "(" + | ||
| 87 | - " app," + | ||
| 88 | - " stream," + | ||
| 89 | - " call_id," + | ||
| 90 | - " start_time," + | ||
| 91 | - " end_time," + | ||
| 92 | - " media_server_id," + | ||
| 93 | - " file_name," + | ||
| 94 | - " folder," + | ||
| 95 | - " file_path," + | ||
| 96 | - " file_size," + | ||
| 97 | - " collect," + | ||
| 98 | - " reserve," + | ||
| 99 | - " time_len " + | ||
| 100 | - ") " + | ||
| 101 | - "values " + | ||
| 102 | - "<foreach collection='cloudRecordItems' index='index' item='item' separator=','> " + | ||
| 103 | - "(#{item.app}, #{item.stream}, #{item.callId}, #{item.startTime}, " + | ||
| 104 | - "#{item.endTime}, #{item.mediaServerId}, #{item.fileName},#{item.folder}," + | ||
| 105 | - "#{item.filePath}, #{item.fileSize}, #{item.collect}, #{item.reserve}, #{item.timeLen}) " + | ||
| 106 | - "</foreach> " + | ||
| 107 | - "</script>") | ||
| 108 | - int batchAdd(@Param("cloudRecordItems") List<CloudRecordItem> cloudRecordItems); | ||
| 109 | - | ||
| 110 | @Select(" <script>" + | 41 | @Select(" <script>" + |
| 111 | "select *" + | 42 | "select *" + |
| 112 | " from wvp_cloud_record " + | 43 | " from wvp_cloud_record " + |