文件录制
This commit is contained in:
+3
@@ -215,6 +215,7 @@ public class VideoServiceImpl implements VideoService {
|
||||
@Transactional
|
||||
public String downloadImage(String fileId,String fileUrl,String roomId) throws IOException {
|
||||
String staticAndMksDir = null;
|
||||
log.info("fileUrl========");
|
||||
if (fileUrl != null) {
|
||||
//下载时文件名称
|
||||
String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
|
||||
@@ -223,6 +224,7 @@ public class VideoServiceImpl implements VideoService {
|
||||
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
|
||||
staticAndMksDir = Paths.get(absPath).toFile().toString();
|
||||
HttpUtil.downloadFile(fileUrl, staticAndMksDir );
|
||||
log.info("selectCaseIdByRoomId========");
|
||||
Long caseId= caseApplicationMapper.selectCaseIdByRoomId(roomId);
|
||||
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
|
||||
// 存入数据库
|
||||
@@ -231,6 +233,7 @@ public class VideoServiceImpl implements VideoService {
|
||||
.annexPath(RuoYiConfig.getVideoUploadPath())
|
||||
.annexType(9)
|
||||
.build();
|
||||
log.info("视频保存========");
|
||||
caseAttachMapper.save(caseAttach);
|
||||
return annexName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user