Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-communication
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-communication
Commits
95df52a3
Commit
95df52a3
authored
Aug 03, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
ee269804
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
yd-communication-api/src/main/java/com/yd/communication/api/record/AliyunRtcRecordService.java
+5
-4
yd-communication-api/src/main/java/com/yd/communication/api/service/impl/ApiCoSessionServiceImpl.java
+7
-7
yd-communication-service/src/main/java/com/yd/communication/service/service/impl/RecordingTaskServiceImpl.java
+2
-1
No files found.
yd-communication-api/src/main/java/com/yd/communication/api/record/AliyunRtcRecordService.java
View file @
95df52a3
...
@@ -55,13 +55,13 @@
...
@@ -55,13 +55,13 @@
// JSONObject body = jsonObject.getJSONObject("Body");
// JSONObject body = jsonObject.getJSONObject("Body");
// String taskId = body.getString("TaskId");
// String taskId = body.getString("TaskId");
// if (taskId == null || taskId.isEmpty()) {
// if (taskId == null || taskId.isEmpty()) {
// throw new
Runtime
Exception("启动录制失败,未返回 TaskId,响应:" + responseData);
// throw new
Business
Exception("启动录制失败,未返回 TaskId,响应:" + responseData);
// }
// }
// log.info("启动录制成功, TaskId: {}", taskId);
// log.info("启动录制成功, TaskId: {}", taskId);
// return taskId;
// return taskId;
// } catch (Exception e) {
// } catch (Exception e) {
// log.error("启动录制失败", e);
// log.error("启动录制失败", e);
// throw new
Runtime
Exception("启动云端录制失败: " + e.getMessage(), e);
// throw new
Business
Exception("启动云端录制失败: " + e.getMessage(), e);
// }
// }
// }
// }
//
//
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
// log.info("停止录制成功, TaskId: {}", taskId);
// log.info("停止录制成功, TaskId: {}", taskId);
// } catch (Exception e) {
// } catch (Exception e) {
// log.error("停止录制失败", e);
// log.error("停止录制失败", e);
// throw new
Runtime
Exception("停止云端录制失败: " + e.getMessage(), e);
// throw new
Business
Exception("停止云端录制失败: " + e.getMessage(), e);
// }
// }
// }
// }
//
//
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
// return info;
// return info;
// } catch (Exception e) {
// } catch (Exception e) {
// log.error("查询录制信息失败", e);
// log.error("查询录制信息失败", e);
// throw new
Runtime
Exception("查询录制信息失败: " + e.getMessage(), e);
// throw new
Business
Exception("查询录制信息失败: " + e.getMessage(), e);
// }
// }
// }
// }
//}
//}
\ No newline at end of file
yd-communication-api/src/main/java/com/yd/communication/api/service/impl/ApiCoSessionServiceImpl.java
View file @
95df52a3
...
@@ -176,7 +176,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
...
@@ -176,7 +176,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
RoomRedisInfoDTO
roomRedisInfoDTO
=
redisUtil
.
getCacheObject
(
RedisEnum
.
ROOM
.
getPrefix
()
+
session
.
getRoomId
());
RoomRedisInfoDTO
roomRedisInfoDTO
=
redisUtil
.
getCacheObject
(
RedisEnum
.
ROOM
.
getPrefix
()
+
session
.
getRoomId
());
if
(
roomRedisInfoDTO
==
null
)
{
if
(
roomRedisInfoDTO
==
null
)
{
log
.
error
(
"【加入会话】会话发起者缓存信息不存在,roomId={}"
,
session
.
getRoomId
());
log
.
error
(
"【加入会话】会话发起者缓存信息不存在,roomId={}"
,
session
.
getRoomId
());
throw
new
Runtime
Exception
(
"会话发起者登录信息失效,建议联系会话发起者再次发起"
);
throw
new
Business
Exception
(
"会话发起者登录信息失效,建议联系会话发起者再次发起"
);
}
}
joinResponse
.
setUserId
(
roomRedisInfoDTO
.
getUserId
());
joinResponse
.
setUserId
(
roomRedisInfoDTO
.
getUserId
());
joinResponse
.
setToken
(
roomRedisInfoDTO
.
getToken
());
joinResponse
.
setToken
(
roomRedisInfoDTO
.
getToken
());
...
@@ -203,19 +203,19 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
...
@@ -203,19 +203,19 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
CoSession
session
=
iCoSessionService
.
getOne
(
wrapper
);
CoSession
session
=
iCoSessionService
.
getOne
(
wrapper
);
if
(
session
==
null
)
{
if
(
session
==
null
)
{
log
.
error
(
"【加入会话-内部】未找到会话,roomPwd={}"
,
roomPwd
);
log
.
error
(
"【加入会话-内部】未找到会话,roomPwd={}"
,
roomPwd
);
throw
new
Runtime
Exception
(
"房间密码(共享码)错误,或客户未发起会话"
);
throw
new
Business
Exception
(
"房间密码(共享码)错误,或客户未发起会话"
);
}
}
log
.
info
(
"【加入会话-内部】找到会话, roomId={}, status={}, currentHolder={}:{}"
,
log
.
info
(
"【加入会话-内部】找到会话, roomId={}, status={}, currentHolder={}:{}"
,
session
.
getRoomId
(),
session
.
getStatus
(),
session
.
getControlHolderType
(),
session
.
getControlHolderId
());
session
.
getRoomId
(),
session
.
getStatus
(),
session
.
getControlHolderType
(),
session
.
getControlHolderId
());
if
(
CoSessionStatusEnum
.
YJS
.
getItemValue
().
equals
(
session
.
getStatus
()))
{
if
(
CoSessionStatusEnum
.
YJS
.
getItemValue
().
equals
(
session
.
getStatus
()))
{
log
.
warn
(
"【加入会话-内部】会话已结束,roomId={}"
,
session
.
getRoomId
());
log
.
warn
(
"【加入会话-内部】会话已结束,roomId={}"
,
session
.
getRoomId
());
throw
new
Runtime
Exception
(
"会话已结束,不能再次加入房间"
);
throw
new
Business
Exception
(
"会话已结束,不能再次加入房间"
);
}
}
if
(
StringUtils
.
isNotBlank
(
session
.
getParticipantId
())
&&
!
session
.
getParticipantId
().
equals
(
participantId
))
{
if
(
StringUtils
.
isNotBlank
(
session
.
getParticipantId
())
&&
!
session
.
getParticipantId
().
equals
(
participantId
))
{
log
.
warn
(
"【加入会话-内部】房间被占用,当前参与者={}, 新参与者={}"
,
log
.
warn
(
"【加入会话-内部】房间被占用,当前参与者={}, 新参与者={}"
,
session
.
getParticipantId
(),
participantId
);
session
.
getParticipantId
(),
participantId
);
throw
new
Runtime
Exception
(
"当前房间被占用,不能加入到房间"
);
throw
new
Business
Exception
(
"当前房间被占用,不能加入到房间"
);
}
}
// 若为待开始状态,设置开始时间并转移控制权
// 若为待开始状态,设置开始时间并转移控制权
...
@@ -360,7 +360,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
...
@@ -360,7 +360,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
CoSession
session
=
iCoSessionService
.
getOne
(
wrapper
);
CoSession
session
=
iCoSessionService
.
getOne
(
wrapper
);
if
(
session
==
null
)
{
if
(
session
==
null
)
{
log
.
error
(
"【切换控制权-内部】会话不存在, roomId={}"
,
roomId
);
log
.
error
(
"【切换控制权-内部】会话不存在, roomId={}"
,
roomId
);
throw
new
Runtime
Exception
(
"会话不存在"
);
throw
new
Business
Exception
(
"会话不存在"
);
}
}
log
.
info
(
"【切换控制权-内部】找到会话, 当前控制者={}:{}"
,
session
.
getControlHolderType
(),
session
.
getControlHolderId
());
log
.
info
(
"【切换控制权-内部】找到会话, 当前控制者={}:{}"
,
session
.
getControlHolderType
(),
session
.
getControlHolderId
());
...
@@ -418,7 +418,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
...
@@ -418,7 +418,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
CoSession
session
=
iCoSessionService
.
getOne
(
wrapper
);
CoSession
session
=
iCoSessionService
.
getOne
(
wrapper
);
if
(
session
==
null
)
{
if
(
session
==
null
)
{
log
.
error
(
"【获取当前控制者】会话不存在, roomId={}"
,
roomId
);
log
.
error
(
"【获取当前控制者】会话不存在, roomId={}"
,
roomId
);
throw
new
Runtime
Exception
(
"会话不存在"
);
throw
new
Business
Exception
(
"会话不存在"
);
}
}
if
(
roomRedisInfoDTO
==
null
)
{
if
(
roomRedisInfoDTO
==
null
)
{
roomRedisInfoDTO
=
new
RoomRedisInfoDTO
();
roomRedisInfoDTO
=
new
RoomRedisInfoDTO
();
...
@@ -454,7 +454,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
...
@@ -454,7 +454,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
CoSession
session
=
iCoSessionService
.
getOne
(
wrapper
);
CoSession
session
=
iCoSessionService
.
getOne
(
wrapper
);
if
(
session
==
null
)
{
if
(
session
==
null
)
{
log
.
error
(
"【更新当前页面】会话不存在, roomId={}"
,
roomId
);
log
.
error
(
"【更新当前页面】会话不存在, roomId={}"
,
roomId
);
throw
new
Runtime
Exception
(
"会话不存在"
);
throw
new
Business
Exception
(
"会话不存在"
);
}
}
String
history
=
session
.
getPageHistory
();
String
history
=
session
.
getPageHistory
();
if
(
history
==
null
||
history
.
equals
(
"[]"
)
||
history
.
isEmpty
())
{
if
(
history
==
null
||
history
.
equals
(
"[]"
)
||
history
.
isEmpty
())
{
...
...
yd-communication-service/src/main/java/com/yd/communication/service/service/impl/RecordingTaskServiceImpl.java
View file @
95df52a3
...
@@ -2,6 +2,7 @@ package com.yd.communication.service.service.impl;
...
@@ -2,6 +2,7 @@ package com.yd.communication.service.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yd.common.enums.CommonEnum
;
import
com.yd.common.enums.CommonEnum
;
import
com.yd.common.exception.BusinessException
;
import
com.yd.common.utils.RandomStringGenerator
;
import
com.yd.common.utils.RandomStringGenerator
;
import
com.yd.communication.service.model.RecordingTask
;
import
com.yd.communication.service.model.RecordingTask
;
import
com.yd.communication.service.dao.RecordingTaskMapper
;
import
com.yd.communication.service.dao.RecordingTaskMapper
;
...
@@ -69,7 +70,7 @@ public class RecordingTaskServiceImpl extends ServiceImpl<RecordingTaskMapper, R
...
@@ -69,7 +70,7 @@ public class RecordingTaskServiceImpl extends ServiceImpl<RecordingTaskMapper, R
wrapper
.
eq
(
RecordingTask:
:
getTaskId
,
taskId
);
wrapper
.
eq
(
RecordingTask:
:
getTaskId
,
taskId
);
RecordingTask
task
=
this
.
getOne
(
wrapper
);
RecordingTask
task
=
this
.
getOne
(
wrapper
);
if
(
task
==
null
)
{
if
(
task
==
null
)
{
throw
new
Runtime
Exception
(
"录制任务不存在"
);
throw
new
Business
Exception
(
"录制任务不存在"
);
}
}
// 模拟停止录制
// 模拟停止录制
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment