Browse Source

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

wangqiong123 2 years ago
parent
commit
6b5e91c4d7

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java View File

@@ -3704,7 +3704,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
3704 3704
         // 查询最大房间号
3705 3705
         Long maxRoomId = caseApplicationMapper.selectMaxRoomId();
3706 3706
 
3707
-        if (null == maxRoomId || maxRoomId > 4294967294L) {
3707
+        if (null == maxRoomId || maxRoomId > 4294967294L/2) {
3708 3708
             return 1L;
3709 3709
         } else {
3710 3710
             return maxRoomId + 1;

+ 17
- 3
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/VideoServiceImpl.java View File

@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
3 3
 import cn.hutool.core.collection.CollectionUtil;
4 4
 import cn.hutool.core.util.StrUtil;
5 5
 import cn.hutool.http.HttpUtil;
6
+import cn.hutool.json.JSONUtil;
6 7
 import com.alibaba.fastjson.JSON;
7 8
 import com.alibaba.fastjson.JSONArray;
8 9
 import com.alibaba.fastjson.JSONObject;
@@ -118,8 +119,8 @@ public class VideoServiceImpl implements VideoService {
118 119
             Integer eventType = jsonObject.getInteger("EventType"); // 事件类型
119 120
             String eventInfo = jsonObject.getString("EventInfo"); // 事件信息
120 121
             JSONObject jsonObject1 = (JSONObject) JSON.parse(eventInfo);
121
-        String roomId = jsonObject1.getString("RoomId");
122
-        String taskId = jsonObject1.getString("TaskId"); // 任务ID
122
+           String roomId = jsonObject1.getString("RoomId");
123
+            String taskId = jsonObject1.getString("TaskId"); // 任务ID
123 124
             String payload = jsonObject1.getString("Payload"); // 根据不同事件类型定义不同
124 125
             JSONObject jsonObject2 = (JSONObject) JSON.parse(payload);
125 126
             String tencentVod = jsonObject2.getString("TencentVod"); // 点播平台信息
@@ -134,7 +135,20 @@ public class VideoServiceImpl implements VideoService {
134 135
                 String mediaId = jsonObject3.getString("MediaId");
135 136
                 // 建立相关的数据库用来存储音视频录制地址并和相关的业务ID绑定,用于后续下载
136 137
                 try {
137
-                    downloadImage(fileId,videoUrl,roomId);
138
+                    // 调解系统roomId>4294967294L/2
139
+                    if(StrUtil.isNotEmpty(roomId)) {
140
+                        if (Integer.getInteger(roomId) > 4294967294L / 2) {
141
+                            // 调用调解系统
142
+                            cn.hutool.json.JSONObject params = JSONUtil.createObj();
143
+                            params.set("roomId",roomId);
144
+                            params.set("fileId",fileId);
145
+                            params.set("videoUrl",videoUrl);
146
+                            HttpUtil.post("http://172.16.1.14:6001/video/videoRollBack",params.toJSONString(2));
147
+
148
+                        } else {
149
+                            downloadImage(fileId, videoUrl, roomId);
150
+                        }
151
+                    }
138 152
 
139 153
                 } catch (IOException e) {
140 154
                     throw new RuntimeException(e);