管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-03-02 ad6e49252090b52b9fcd85e0925ca91da9afaa74
src/main/java/com/lf/server/service/data/DataQueryService.java
@@ -52,7 +52,14 @@
            AttachEntity ae = getAttachEntity(ue, tabName, eventid, fileName, md5, sizes);
            if (entity != null) {
                ae.setPath(entity.getPath());
                String targetPath = pathHelper.getConfig().getUploadPath() + File.separator + ae.getPath();
                File f = new File(targetPath);
                if (!f.exists() || f.isDirectory()) {
                    newFile.renameTo(new File(targetPath));
                } else {
                newFile.delete();
                }
            }else {
                String targetPath = pathHelper.getConfig().getUploadPath() + File.separator + ae.getPath();
                newFile.renameTo(new File(targetPath));