wangliang 2 gadi atpakaļ
vecāks
revīzija
9b5e6da482

+ 2 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -1030,12 +1030,11 @@ public class TaskLogicServiceImpl implements TaskLogicService {
         if (Objects.nonNull(attachmentType) && !Objects.equals(attachmentType, SystemConstant.LOCAL)) {
             file = fileStoreUtil.ossDownload(jsonObject.getString(SystemConstant.PDF_PATH), file, UploadFileEnum.PDF.getFssType());
         } else {
-            String path = SystemConstant.getLocalFilePath(jsonObject.getString(SystemConstant.PDF_PATH));
             File sourceFile = null;
             if (dictionaryConfig.fssPrivateDomain().getConfig().startsWith(SystemConstant.START_PARENT) || dictionaryConfig.fssPublicDomain().getConfig().startsWith(SystemConstant.START_PARENT)) {
                 sourceFile = new File(dictionaryConfig.fssPrivateDomain().getConfig(), jsonObject.getString(SystemConstant.PDF_PATH));
             } else {
-                sourceFile = new File(path);
+                sourceFile = new File(jsonObject.getString(SystemConstant.PDF_PATH));
             }
             FileUtils.copyFile(sourceFile, file);
         }
@@ -1064,12 +1063,11 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             if (Objects.nonNull(attachmentType) && !Objects.equals(attachmentType, SystemConstant.LOCAL)) {
                 file = fileStoreUtil.ossDownload(jsonObject.getString(SystemConstant.PATH), file, uploadFileEnum.getFssType());
             } else {
-                String path = SystemConstant.getLocalFilePath(jsonObject.getString(SystemConstant.PATH));
                 File sourceFile = null;
                 if (dictionaryConfig.fssPrivateDomain().getConfig().startsWith(SystemConstant.START_PARENT) || dictionaryConfig.fssPublicDomain().getConfig().startsWith(SystemConstant.START_PARENT)) {
                     sourceFile = new File(dictionaryConfig.fssPrivateDomain().getConfig(), jsonObject.getString(SystemConstant.PATH));
                 } else {
-                    sourceFile = new File(path);
+                    sourceFile = new File(jsonObject.getString(SystemConstant.PATH));
                 }
                 FileUtils.copyFile(sourceFile, file);
             }

+ 9 - 9
distributed-print/src/main/resources/application.properties

@@ -57,15 +57,15 @@ spring.activiti.history-level=audit
 #com.qmth.fss.private.config=oss://LTAI4Fi8jVRYT49QBXU9x5QX:97aBLBfkQR5mzCiQa82yWLAH57eUd8@teachcloud-test.oss-cn-shenzhen.aliyuncs.com
 #com.qmth.fss.private.server=https://teachcloud-test.oss-cn-shenzhen.aliyuncs.com
 
-com.qmth.fss.public.config=../static/
-com.qmth.fss.public.server=/static/
-com.qmth.fss.private.config=../static/
-com.qmth.fss.private.server=/static/
-
-#com.qmth.fss.localfile.config=/Users/king/Downloads/file-temp
-#com.qmth.fss.localfile.server=http://127.0.0.1:7001
-#com.qmth.fss.localpdf.config=/Users/king/Downloads/pdf-temp
-#com.qmth.fss.localpdf.server=http://127.0.0.1:7001
+#com.qmth.fss.public.config=../static/
+#com.qmth.fss.public.server=/static/
+#com.qmth.fss.private.config=../static/
+#com.qmth.fss.private.server=/static/
+
+com.qmth.fss.public.config=/Users/king/Downloads/file-temp
+com.qmth.fss.public.server=/file-temp/
+com.qmth.fss.private.config=/Users/king/Downloads/pdf-temp
+com.qmth.fss.private.server=/pdf-temp/
 
 #\u7CFB\u7EDF\u914D\u7F6E
 sys.config.oss=false

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -883,7 +883,7 @@ public class SystemConstant {
         if (oss || (!oss && dictionaryConfig.fssPrivateDomain().getConfig().startsWith(SystemConstant.START_PARENT))) {
             fileStoreUtil.ossUpload(pdfDirName, file, DigestUtils.md5Hex(new FileInputStream(file)), fileStoreUtil.getUploadEnumByPath(pdfDirName).getFssType());
         } else {
-            fileStoreUtil.localUpload(pdfDirName, new FileInputStream(file), DigestUtils.md5Hex(new FileInputStream(file)), LocalCatalogEnum.LOCAL_FILE);
+            fileStoreUtil.localUpload(pdfDirName, new FileInputStream(file), DigestUtils.md5Hex(new FileInputStream(file)), LocalCatalogEnum.LOCAL_PDF);
         }
         return pdfDirName;
     }

+ 1 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/AttachmentCommonServiceImpl.java

@@ -69,11 +69,10 @@ public class AttachmentCommonServiceImpl implements AttachmentCommonService {
                 }
             } else {
                 File file = null;
-                String pathNew = SystemConstant.getLocalFilePath(filePath);
                 if (dictionaryConfig.fssPrivateDomain().getConfig().startsWith(SystemConstant.START_PARENT) || dictionaryConfig.fssPublicDomain().getConfig().startsWith(SystemConstant.START_PARENT)) {
                     file = new File(dictionaryConfig.fssPrivateDomain().getConfig(), filePath);
                 } else {
-                    file = new File(pathNew);
+                    file = new File(filePath);
                 }
                 FileUtils.copyFile(file, localPath);
                 return localPath;

+ 2 - 5
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TeachcloudCommonServiceImpl.java

@@ -549,12 +549,11 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
                 if (type.equals(SystemConstant.OSS)) {
                     fis = fileStoreUtil.ossDownloadIs(filePath, uploadType.getFssType());
                 } else {
-                    path = SystemConstant.getLocalFilePath(filePath);
                     File file = null;
                     if (dictionaryConfig.fssPrivateDomain().getConfig().startsWith(SystemConstant.START_PARENT) || dictionaryConfig.fssPublicDomain().getConfig().startsWith(SystemConstant.START_PARENT)) {
                         file = new File(dictionaryConfig.fssPublicDomain().getConfig(), filePath);
                     } else {
-                        file = new File(path);
+                        file = new File(filePath);
                     }
                     fis = new FileInputStream(file);
                 }
@@ -595,12 +594,10 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
             fileTempList.add(fileTemp);
             file = fileStoreUtil.ossDownload(filePath, fileTemp, uploadType.getFssType());
         } else {
-            String pathNew = SystemConstant.getLocalFilePath(filePath);
-            File sourceFile = null;
             if (dictionaryConfig.fssPrivateDomain().getConfig().startsWith(SystemConstant.START_PARENT) || dictionaryConfig.fssPublicDomain().getConfig().startsWith(SystemConstant.START_PARENT)) {
                 file = new File(dictionaryConfig.fssPrivateDomain().getConfig(), filePath);
             } else {
-                file = new File(pathNew);
+                file = new File(filePath);
             }
         }
         return file;

+ 13 - 8
teachcloud-task/src/main/resources/application.properties

@@ -53,15 +53,20 @@ spring.activiti.history-level=audit
 #com.qmth.fss.private.config=oss://key:secret@teachcloud-print-dev-private.oss-api.qmth.com.cn
 #com.qmth.fss.private.server=http://oss-file.qmth.com.cn/teachcloud-print-dev-private
 
-com.qmth.fss.public.config=../static/
-com.qmth.fss.public.server=/static/
-com.qmth.fss.private.config=../static/
-com.qmth.fss.private.server=/static/
+#com.qmth.fss.public.config=oss://LTAI4Fi8jVRYT49QBXU9x5QX:97aBLBfkQR5mzCiQa82yWLAH57eUd8@teachcloud-test.oss-cn-shenzhen.aliyuncs.com
+#com.qmth.fss.public.server=https://teachcloud-test.oss-cn-shenzhen.aliyuncs.com
+#com.qmth.fss.private.config=oss://LTAI4Fi8jVRYT49QBXU9x5QX:97aBLBfkQR5mzCiQa82yWLAH57eUd8@teachcloud-test.oss-cn-shenzhen.aliyuncs.com
+#com.qmth.fss.private.server=https://teachcloud-test.oss-cn-shenzhen.aliyuncs.com
 
-#com.qmth.fss.localfile.config=/Users/king/Downloads/file-temp
-#com.qmth.fss.localfile.server=http://127.0.0.1:7001
-#com.qmth.fss.localpdf.config=/Users/king/Downloads/pdf-temp
-#com.qmth.fss.localpdf.server=http://127.0.0.1:7001
+#com.qmth.fss.public.config=../static/
+#com.qmth.fss.public.server=/static/
+#com.qmth.fss.private.config=../static/
+#com.qmth.fss.private.server=/static/
+
+com.qmth.fss.public.config=/Users/king/Downloads/file-temp
+com.qmth.fss.public.server=/file-temp/
+com.qmth.fss.private.config=/Users/king/Downloads/pdf-temp
+com.qmth.fss.private.server=/pdf-temp/
 
 #\u7CFB\u7EDF\u914D\u7F6E
 sys.config.oss=false