管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-03-02 ad6e49252090b52b9fcd85e0925ca91da9afaa74
1
已修改1个文件
13 ■■■■ 文件已修改
src/main/java/com/lf/server/service/data/DataQueryService.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/data/DataQueryService.java
@@ -52,8 +52,15 @@
            AttachEntity ae = getAttachEntity(ue, tabName, eventid, fileName, md5, sizes);
            if (entity != null) {
                ae.setPath(entity.getPath());
                newFile.delete();
            }else {
                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));
            }
@@ -73,7 +80,7 @@
        entity.setTabGuid(eventid);
        entity.setName(fileName);
        entity.setGuid(md5);
        String subPath = PathHelper.getUploadPath() + File.separator + md5+ FileHelper.getExtension(fileName);
        String subPath = PathHelper.getUploadPath() + File.separator + md5 + FileHelper.getExtension(fileName);
        entity.setPath(subPath);
        entity.setSizes(sizes);
        if (ue != null) {