Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev

This commit was merged in pull request #161.
This commit is contained in:
2023-10-31 09:11:22 +08:00
committed by Gitea
@@ -222,17 +222,19 @@ public class VideoServiceImpl implements VideoService {
fileName=fileId+fileName;
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
staticAndMksDir = Paths.get(absPath).toFile().toString();
HttpUtil.downloadFile(fileUrl, staticAndMksDir );
Long caseId= caseApplicationMapper.selectCaseIdByRoomId(roomId);
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
// 存入数据库
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
.annexName(annexName)
.annexPath(RuoYiConfig.getVideoUploadPath())
.annexType(9)
.build();
caseAttachMapper.save(caseAttach);
return annexName;
long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
if(downloadFile>0) {
Long caseId = caseApplicationMapper.selectCaseIdByRoomId(roomId);
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
// 存入数据库
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
.annexName(annexName)
.annexPath(RuoYiConfig.getVideoUploadPath())
.annexType(9)
.build();
caseAttachMapper.save(caseAttach);
return annexName;
}
}
return "";