Browse Source

客户修改

Guo1B0 1 year ago
parent
commit
32e031be4f

+ 2 - 3
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/CustomServiceImpl.java

@@ -386,7 +386,7 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
     }
 
 
-    @Value(value = "${upload.file}")
+    @Value(value = "${upload.path}")
     private String filePath;
 
     @Override
@@ -414,7 +414,7 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
                 long size = file.getSize();
                 double v = (double) size / (1024 * 1024);
                 String format = String.format("%.2f MB", v);
-                uf.setPath("/file/" + realName);
+                uf.setPath(filePath + realName);
                 uf.setCode("custom");
                 System.out.println(format);
                 uf.setSize(format);
@@ -469,7 +469,6 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
             // 读取文件的字节流
             os.write(FileUtil.readFileByBytes(uploadFile1));
             os.flush();
-
         } catch (IOException e) {
             msg.setError(MessageUtils.message("file.error"));
             e.printStackTrace();