Selaa lähdekoodia

更新 video 相关类字段

reghao 2 vuotta sitten
vanhempi
commit
87056c0a86

+ 1 - 1
dfs-store/src/main/java/cn/reghao/dfs/store/db/repository/ObjectRepository.java

@@ -62,7 +62,7 @@ public class ObjectRepository {
         return fileMetaMapper.findBySha256sum(sha256sum);
     }
 
-    @Cacheable(cacheNames = "objectMeta", key = "#objectName", unless = "#result == null")
+    @Cacheable(cacheNames = "dfs-store:objectMeta", key = "#objectName", unless = "#result == null")
     public ObjectMeta getObjectMeta(String objectName) {
         log.info("查找 db");
         ObjectMeta objectMeta = fileMetaMapper.findObjectMeta(objectName);

+ 0 - 2
dfs-store/src/main/java/cn/reghao/dfs/store/model/po/VideoFile.java

@@ -22,8 +22,6 @@ public class VideoFile extends BaseObject<Integer> {
     private Integer duration;
     private Boolean activate;
     private Boolean auth;
-    @Deprecated
-    private String coverUrl;
 
     public VideoFile(String videoFileId, boolean horizontal, int duration) {
         this.videoFileId = videoFileId;

+ 2 - 1
dfs-store/src/main/java/cn/reghao/dfs/store/task/VideoFileProcessor.java

@@ -136,7 +136,8 @@ public class VideoFileProcessor {
                 throw new IOException(absolutePath + " exist");
             }
 
-            int ret = FFmpegWrapper.formatCovert(file.getAbsolutePath(), absolutePath, "mp4");
+            String suffix = "mp4";
+            int ret = FFmpegWrapper.formatCovert(file.getAbsolutePath(), absolutePath + "." + suffix, suffix);
             if (ret != 0) {
                 throw new Exception("视频转码失败");
             }