leo.xie 3 年之前
父節點
當前提交
d7071092c0
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/main/java/com/ads/business/service/impl/DocServiceImpl.java

+ 3 - 3
src/main/java/com/ads/business/service/impl/DocServiceImpl.java

@@ -339,7 +339,7 @@ public class DocServiceImpl extends ServiceImpl<DocDao, Doc> implements DocServi
     }
 
     private String getImageFilePath(Long docId){
-        return pictureConfig.getServerBasePath() +"/"+ pictureConfig.getUploadPath() + "/produce/" +  docId;
+        return pictureConfig.getBasePath() + "/" + pictureConfig.getUploadPath() + "/produce/" + docId;
     }
 
     @Override
@@ -360,8 +360,8 @@ public class DocServiceImpl extends ServiceImpl<DocDao, Doc> implements DocServi
         String domain = pictureConfig.getServerPath();
         String path = domain + request.getContextPath() + "/";
         String filePath = pictureConfig.getServerBasePath() +"/"+ pictureConfig.getUploadPath() + "/produce/" + docId + ".pdf";
-        String imageFilePath = getImageFilePath(docId) + "/";
-        String createPath = pictureConfig.getBasePath() + "/" + pictureConfig.getUploadPath() + "/produce/" + docId + ".pdf";
+        String imageFilePath = pictureConfig.getServerBasePath() +"/"+ pictureConfig.getUploadPath() + "/produce/" +  docId + "/";
+        String createPath = getImageFilePath(docId) + ".pdf";
         File fromFile = new File(createPath);
         //判断目标文件所在的目录是否存在
         if (!fromFile.getParentFile().exists()) {