|
@@ -803,7 +803,10 @@ public class EmailParseService {
|
|
|
|
|
|
String emailDateStr = DateUtil.format(sendDate, DateConst.YYYYMMDD);
|
|
|
String filePath = path + File.separator + account + File.separator + emailDateStr + File.separator;
|
|
|
- File saveFile = FileUtil.file(filePath + fileName);
|
|
|
+ // 压缩包重名时的后面的压缩包会覆盖前面压缩包的问题(不考虑普通文件)
|
|
|
+ String emailDate = DateUtil.format(sendDate, DateConst.YYYYMMDDHHMMSS24);
|
|
|
+ String realName = (fileName.endsWith(".zip") || fileName.endsWith(".rar")) ? emailDate + fileName : fileName;
|
|
|
+ File saveFile = FileUtil.file(filePath + realName);
|
|
|
if (!saveFile.exists()) {
|
|
|
if (!saveFile.getParentFile().exists()) {
|
|
|
boolean mkdirs = saveFile.getParentFile().mkdirs();
|