瀏覽代碼

添加属性文件md5

Shinohara Haruna 5 月之前
父節點
當前提交
6e40d9f7e3

+ 2 - 0
smsb-modules/smsb-source/src/main/java/com/inspur/source/domain/vo/SmsbMinioDataVo.java

@@ -103,6 +103,8 @@ public class SmsbMinioDataVo implements Serializable {
 
     private String fileUrl;
 
+    private String md5;
+
     /**
      * 转码状态 0:待转码,1:转码成功,2:转码失败
      */

+ 2 - 0
smsb-plus-ui/src/api/smsb/source/minioData_type.ts

@@ -55,6 +55,8 @@ export interface MinioDataVO {
   fileUrl: string;
 
   useNum: number;
+
+  md5: string;
 }
 
 export interface MinioDataForm extends BaseEntity {

+ 7 - 3
smsb-plus-ui/src/components/MediaFileSelector.vue

@@ -129,6 +129,7 @@ const getFileList = async () => {
 
 // 多选框选中文件数据
 function handleSelectionFile(selection: MinioDataVO[]) {
+  console.log('[handleSelectionFile] selection:', selection);
   if (props.single && props.onlyImage) {
     // 单选且仅图片
     if (selection.length > 0) {
@@ -141,7 +142,8 @@ function handleSelectionFile(selection: MinioDataVO[]) {
             type: img.type,
             duration: 10,
             order: 1,
-            url: img.fileUrl
+            url: img.fileUrl,
+            md5: img.md5
           }
         ];
       } else {
@@ -160,7 +162,8 @@ function handleSelectionFile(selection: MinioDataVO[]) {
           type: selection[0].type,
           duration: selection[0].duration,
           order: 1,
-          url: selection[0].fileUrl
+          url: selection[0].fileUrl,
+          md5: selection[0].md5
         }
       ];
     } else {
@@ -174,7 +177,8 @@ function handleSelectionFile(selection: MinioDataVO[]) {
       type: item.type,
       duration: item.duration,
       order: idx + 1,
-      url: item.fileUrl
+      url: item.fileUrl,
+      md5: item.md5
     }));
   }
 }