mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 17:36:47 +08:00
文件读取逻辑纠正
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user