视频回调 #335

Merged
wangqiong123 merged 1 commits from wq into dev 2024-01-19 02:47:37 +00:00
2 changed files with 18 additions and 4 deletions
Showing only changes of commit 5f622b0641 - Show all commits
@@ -3704,7 +3704,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
// 查询最大房间号
Long maxRoomId = caseApplicationMapper.selectMaxRoomId();
if (null == maxRoomId || maxRoomId > 4294967294L) {
if (null == maxRoomId || maxRoomId > 4294967294L/2) {
return 1L;
} else {
return maxRoomId + 1;
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
@@ -118,8 +119,8 @@ public class VideoServiceImpl implements VideoService {
Integer eventType = jsonObject.getInteger("EventType"); // 事件类型
String eventInfo = jsonObject.getString("EventInfo"); // 事件信息
JSONObject jsonObject1 = (JSONObject) JSON.parse(eventInfo);
String roomId = jsonObject1.getString("RoomId");
String taskId = jsonObject1.getString("TaskId"); // 任务ID
String roomId = jsonObject1.getString("RoomId");
String taskId = jsonObject1.getString("TaskId"); // 任务ID
String payload = jsonObject1.getString("Payload"); // 根据不同事件类型定义不同
JSONObject jsonObject2 = (JSONObject) JSON.parse(payload);
String tencentVod = jsonObject2.getString("TencentVod"); // 点播平台信息
@@ -134,7 +135,20 @@ public class VideoServiceImpl implements VideoService {
String mediaId = jsonObject3.getString("MediaId");
// 建立相关的数据库用来存储音视频录制地址并和相关的业务ID绑定,用于后续下载
try {
downloadImage(fileId,videoUrl,roomId);
// 调解系统roomId>4294967294L/2
if(StrUtil.isNotEmpty(roomId)) {
if (Integer.getInteger(roomId) > 4294967294L / 2) {
// 调用调解系统
cn.hutool.json.JSONObject params = JSONUtil.createObj();
params.set("roomId",roomId);
params.set("fileId",fileId);
params.set("videoUrl",videoUrl);
HttpUtil.post("http://172.16.1.14:6001/video/videoRollBack",params.toJSONString(2));
} else {
downloadImage(fileId, videoUrl, roomId);
}
}
} catch (IOException e) {
throw new RuntimeException(e);