From 2d3e0e46a847ded9258bbfd94dac4cecfb718eb1 Mon Sep 17 00:00:00 2001 From: caihaohan Date: Wed, 9 Oct 2024 14:29:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=A8=E7=BA=BF=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E4=BF=AE=E8=AE=A2=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onlyoffice/service/impl/ProcessFileServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/impl/ProcessFileServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/impl/ProcessFileServiceImpl.java index a6f2c893..fd6e3b03 100644 --- a/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/impl/ProcessFileServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/onlyoffice/service/impl/ProcessFileServiceImpl.java @@ -87,6 +87,10 @@ public class ProcessFileServiceImpl implements IProcessFileService { @Override public String findEditFileByStandardNo(String standardNo) { OSSFile lastDocFileByStandardNo = this.findLastDocFileByStandardNo(standardNo); + if (lastDocFileByStandardNo == null) { + // 没有docx文件则自动生成并返回 + return this.saveEditFile(standardNo); + } // 有的话需要转换为在线编辑的文件 return lastDocFileByStandardNo.getId(); }