|
|
@@ -215,6 +215,7 @@ public class VideoServiceImpl implements VideoService {
|
|
215
|
215
|
@Transactional
|
|
216
|
216
|
public String downloadImage(String fileId,String fileUrl,String roomId) throws IOException {
|
|
217
|
217
|
String staticAndMksDir = null;
|
|
|
218
|
+ log.info("fileUrl========");
|
|
218
|
219
|
if (fileUrl != null) {
|
|
219
|
220
|
//下载时文件名称
|
|
220
|
221
|
String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
|
|
|
@@ -223,6 +224,7 @@ public class VideoServiceImpl implements VideoService {
|
|
223
|
224
|
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
|
|
224
|
225
|
staticAndMksDir = Paths.get(absPath).toFile().toString();
|
|
225
|
226
|
HttpUtil.downloadFile(fileUrl, staticAndMksDir );
|
|
|
227
|
+ log.info("selectCaseIdByRoomId========");
|
|
226
|
228
|
Long caseId= caseApplicationMapper.selectCaseIdByRoomId(roomId);
|
|
227
|
229
|
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
|
|
228
|
230
|
// 存入数据库
|
|
|
@@ -231,6 +233,7 @@ public class VideoServiceImpl implements VideoService {
|
|
231
|
233
|
.annexPath(RuoYiConfig.getVideoUploadPath())
|
|
232
|
234
|
.annexType(9)
|
|
233
|
235
|
.build();
|
|
|
236
|
+ log.info("视频保存========");
|
|
234
|
237
|
caseAttachMapper.save(caseAttach);
|
|
235
|
238
|
return annexName;
|
|
236
|
239
|
}
|