From 28eeedaff64ab25b6a38aa443e9d46597b8e3495 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期一, 09 一月 2023 14:59:57 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/entity/data/MetaFileEntity.java    |   60 +++++-------------------------
 src/main/java/com/lf/server/service/all/BaseUploadService.java |   18 +++-----
 2 files changed, 17 insertions(+), 61 deletions(-)

diff --git a/src/main/java/com/lf/server/entity/data/MetaFileEntity.java b/src/main/java/com/lf/server/entity/data/MetaFileEntity.java
index ae0249c..3469b7c 100644
--- a/src/main/java/com/lf/server/entity/data/MetaFileEntity.java
+++ b/src/main/java/com/lf/server/entity/data/MetaFileEntity.java
@@ -11,8 +11,6 @@
 
     private String eventid;
 
-    private int metaid;
-
     private int dirid;
 
     private int depid;
@@ -29,17 +27,11 @@
 
     private double sizes;
 
-    private String bstab;
-
-    private int bsrows;
-
-    private String mdtab;
-
-    private int mdrows;
-
     private int createUser;
 
     private String cs;
+
+    private String extName;
 
     public String getEventid() {
         return eventid;
@@ -47,14 +39,6 @@
 
     public void setEventid(String eventid) {
         this.eventid = eventid;
-    }
-
-    public int getMetaid() {
-        return metaid;
-    }
-
-    public void setMetaid(int metaid) {
-        this.metaid = metaid;
     }
 
     public int getDirid() {
@@ -121,38 +105,6 @@
         this.sizes = sizes;
     }
 
-    public String getBstab() {
-        return bstab;
-    }
-
-    public void setBstab(String bstab) {
-        this.bstab = bstab;
-    }
-
-    public int getBsrows() {
-        return bsrows;
-    }
-
-    public void setBsrows(int bsrows) {
-        this.bsrows = bsrows;
-    }
-
-    public String getMdtab() {
-        return mdtab;
-    }
-
-    public void setMdtab(String mdtab) {
-        this.mdtab = mdtab;
-    }
-
-    public int getMdrows() {
-        return mdrows;
-    }
-
-    public void setMdrows(int mdrows) {
-        this.mdrows = mdrows;
-    }
-
     public int getCreateUser() {
         return createUser;
     }
@@ -168,4 +120,12 @@
     public void setCs(String cs) {
         this.cs = cs;
     }
+
+    public String getExtName() {
+        return extName;
+    }
+
+    public void setExtName(String extName) {
+        this.extName = extName;
+    }
 }
diff --git a/src/main/java/com/lf/server/service/all/BaseUploadService.java b/src/main/java/com/lf/server/service/all/BaseUploadService.java
index 676e767..a6ce5ae 100644
--- a/src/main/java/com/lf/server/service/all/BaseUploadService.java
+++ b/src/main/java/com/lf/server/service/all/BaseUploadService.java
@@ -147,21 +147,17 @@
         List<MetaFileEntity> list = new ArrayList<>();
         for (File f : files) {
             String fileName = FileHelper.getFileName(f.getPath());
-            if (null != extList) {
-                String extName = FileHelper.getExtension(fileName);
-                if (!extList.contains(extName)) {
-                    continue;
-                }
+            String extName = FileHelper.getExtension(fileName);
+            if (null != extList && !extList.contains(extName)) {
+                continue;
             }
-
-            double sizes = FileHelper.sizeToMb(f.length());
-            String filePath = subPath + File.separator + fileName;
 
             MetaFileEntity mf = new MetaFileEntity();
             mf.setName(fileName);
-            mf.setSizes(sizes);
-            mf.setPath(filePath);
-            mf.setGuid(FileHelper.getFileMd5(f.getPath()));
+            mf.setExtName(extName);
+            mf.setSizes(FileHelper.sizeToMb(f.length()));
+            mf.setPath(subPath + File.separator + fileName);
+            // mf.setGuid(FileHelper.getFileMd5(f.getPath()))
 
             list.add(mf);
         }

--
Gitblit v1.9.3