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

This commit was merged in pull request #157.
This commit is contained in:
2023-10-28 12:01:58 +08:00
committed by Gitea
2 changed files with 4 additions and 2 deletions
@@ -51,10 +51,9 @@ public class VideoController extends BaseController {
}
/**
* 根据案件ID查询视频
* @param
* @param caseId 案件id
* @return
*/
@Anonymous
@GetMapping("/videoList")
public AjaxResult videoList( @RequestParam Long caseId) {
@@ -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;
}