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; }