6c
2026-01-04 cda6223dada56ea9e3bda16503a18f3d9bb630c4
src/main/java/com/product/file/service/FileManagerService.java
@@ -266,6 +266,11 @@
         return false;
      }
        // 存放在数据库中的文件,直接判定是否有值
        if (attachmentFse.getValue(CmnConst.FILE_CONTENT) != null) {
            return true;
        }
      //判断文件存放在服务器还是本地
      boolean needDownloadFromServerFlag = "1".equals(attachmentFse.getString(CmnConst.UPLOAD_SIGN));
      String dir = attachmentFse.getString(CmnConst.ATTACHMENT_URL);
@@ -886,6 +891,7 @@
                    if (saveInDb) {
                        File localFile = new File(Global.getSystemConfig("local.dir", "") + File.separator + attachmentFse.getString(CmnConst.ATTACHMENT_URL) + File.separator + fileName);
                        if (!localFile.exists()) {
                            localFile.getParentFile().mkdirs();
                            Files.copy(is, localFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
                        }
                    }