浏览代码

本地部署生成pdf调整

wangliang 3 年之前
父节点
当前提交
3d5bd6784a

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

@@ -601,7 +601,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
 //            createPdfUtil.deleteAttachment(attachmentIds, ftlList);
 //            createPdfUtil.deleteAttachment(attachmentIds, ftlList);
         } catch (Exception e) {
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
             log.error(SystemConstant.LOG_ERROR, e);
-            if (dictionaryConfig.sysDomain().isOss()) {
+            if (Objects.nonNull(dictionaryConfig.sysDomain()) && dictionaryConfig.sysDomain().isOss()) {
                 basicAttachmentService.batchDeleteAttachment(basicAttachmentList);
                 basicAttachmentService.batchDeleteAttachment(basicAttachmentList);
             }
             }
             if (e instanceof ApiException) {
             if (e instanceof ApiException) {

+ 4 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/sync/CloudMarkingTaskUtils.java

@@ -237,8 +237,10 @@ public class CloudMarkingTaskUtils {
         } catch (Exception e) {
         } catch (Exception e) {
             throw ExceptionResultEnum.ERROR.exception(e.getMessage());
             throw ExceptionResultEnum.ERROR.exception(e.getMessage());
         } finally {
         } finally {
-            if (file != null && file.exists()) {
-                file.delete();
+            if (Objects.nonNull(dictionaryConfig.sysDomain()) && dictionaryConfig.sysDomain().isOss()) {
+                if (file != null && file.exists()) {
+                    file.delete();
+                }
             }
             }
         }
         }
         return "";
         return "";