From 4ec94848d24833c3c5d1a8b721ce81363db68f28 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 05 八月 2024 20:11:01 +0800
Subject: [PATCH] 优化代码
---
pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java b/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java
index c41d614..1750c48 100644
--- a/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java
+++ b/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java
@@ -72,6 +72,11 @@
zipFileInput = ZipImg.zipToJpg(fPic, photoZipWidth, photoZipWidth) ;
}
boolean zipOk = new FileUtil().saveFile(zipFilePath, zipFileInput) ;
+ //濡傛灉鍘嬬缉鏂囦欢涓嶅瓨鍦ㄦ垨鐢熸垚澶辫触锛屽垯澶嶅埗婧愭枃浠�
+ File zipFile = new File(zipFilePath);
+ if (!zipFile.exists() || zipFile.length()==0) {
+ zipOk = new FileUtil().saveFile(zipFilePath, file.getInputStream()) ;
+ }
}
}
}
--
Gitblit v1.8.0