From fb9d31e2ec2e9979fbe5169d5df7e0a01333c883 Mon Sep 17 00:00:00 2001 From: "liu.zixi" Date: Wed, 24 Sep 2025 13:59:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=AF=BB=E5=8F=96=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E7=BA=A0=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/CaseKnowledgeServiceImpl.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/servers/boe-server-all/src/main/java/com/xboe/module/boecase/service/impl/CaseKnowledgeServiceImpl.java b/servers/boe-server-all/src/main/java/com/xboe/module/boecase/service/impl/CaseKnowledgeServiceImpl.java index 28f212d1..2025d22f 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/module/boecase/service/impl/CaseKnowledgeServiceImpl.java +++ b/servers/boe-server-all/src/main/java/com/xboe/module/boecase/service/impl/CaseKnowledgeServiceImpl.java @@ -6,6 +6,7 @@ import com.xboe.common.utils.IDGenerator; import com.xboe.common.utils.StringUtil; import com.xboe.common.OrderCondition; import com.xboe.core.orm.FieldFilters; +import com.xboe.core.upload.XFileUploader; import com.xboe.enums.CaseDocumentLogCaseStatusEnum; import com.xboe.enums.CaseDocumentLogOptStatusEnum; import com.xboe.enums.CaseDocumentLogOptTypeEnum; @@ -61,6 +62,9 @@ public class CaseKnowledgeServiceImpl implements ICaseKnowledgeService { @Resource private CaseDocumentLogDao caseDocumentLogDao; + @Resource + private XFileUploader fileUploader; + @Autowired private IAiAccessTokenService aiAccessTokenService; @@ -86,9 +90,11 @@ public class CaseKnowledgeServiceImpl implements ICaseKnowledgeService { return false; } - File file = new File(caseEntity.getFilePath()); + String savePath = fileUploader.getSavePath(); + String filePath = savePath + caseEntity.getFilePath(); + File file = new File(filePath); if (!file.exists()) { - log.error("上传案例文档失败,案例文件不存在,filePath: {}", caseEntity.getFilePath()); + log.error("上传案例文档失败,案例文件不存在,filePath: {}", filePath); return false; } @@ -380,9 +386,11 @@ public class CaseKnowledgeServiceImpl implements ICaseKnowledgeService { return false; } - File file = new File(caseEntity.getFilePath()); + String savePath = fileUploader.getSavePath(); + String filePath = savePath + caseEntity.getFilePath(); + File file = new File(filePath); if (!file.exists()) { - log.warn("调用上传接口失败,案例文件不存在,filePath: {}", caseEntity.getFilePath()); + log.warn("调用上传接口失败,案例文件不存在,filePath: {}", filePath); return false; }