视频回调 #335
+1
-1
@@ -3704,7 +3704,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
// 查询最大房间号
|
// 查询最大房间号
|
||||||
Long maxRoomId = caseApplicationMapper.selectMaxRoomId();
|
Long maxRoomId = caseApplicationMapper.selectMaxRoomId();
|
||||||
|
|
||||||
if (null == maxRoomId || maxRoomId > 4294967294L) {
|
if (null == maxRoomId || maxRoomId > 4294967294L/2) {
|
||||||
return 1L;
|
return 1L;
|
||||||
} else {
|
} else {
|
||||||
return maxRoomId + 1;
|
return maxRoomId + 1;
|
||||||
|
|||||||
+17
-3
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
|
|||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpUtil;
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@@ -118,8 +119,8 @@ public class VideoServiceImpl implements VideoService {
|
|||||||
Integer eventType = jsonObject.getInteger("EventType"); // 事件类型
|
Integer eventType = jsonObject.getInteger("EventType"); // 事件类型
|
||||||
String eventInfo = jsonObject.getString("EventInfo"); // 事件信息
|
String eventInfo = jsonObject.getString("EventInfo"); // 事件信息
|
||||||
JSONObject jsonObject1 = (JSONObject) JSON.parse(eventInfo);
|
JSONObject jsonObject1 = (JSONObject) JSON.parse(eventInfo);
|
||||||
String roomId = jsonObject1.getString("RoomId");
|
String roomId = jsonObject1.getString("RoomId");
|
||||||
String taskId = jsonObject1.getString("TaskId"); // 任务ID
|
String taskId = jsonObject1.getString("TaskId"); // 任务ID
|
||||||
String payload = jsonObject1.getString("Payload"); // 根据不同事件类型定义不同
|
String payload = jsonObject1.getString("Payload"); // 根据不同事件类型定义不同
|
||||||
JSONObject jsonObject2 = (JSONObject) JSON.parse(payload);
|
JSONObject jsonObject2 = (JSONObject) JSON.parse(payload);
|
||||||
String tencentVod = jsonObject2.getString("TencentVod"); // 点播平台信息
|
String tencentVod = jsonObject2.getString("TencentVod"); // 点播平台信息
|
||||||
@@ -134,7 +135,20 @@ public class VideoServiceImpl implements VideoService {
|
|||||||
String mediaId = jsonObject3.getString("MediaId");
|
String mediaId = jsonObject3.getString("MediaId");
|
||||||
// 建立相关的数据库用来存储音视频录制地址并和相关的业务ID绑定,用于后续下载
|
// 建立相关的数据库用来存储音视频录制地址并和相关的业务ID绑定,用于后续下载
|
||||||
try {
|
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) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user