Commit 95df52a3 by zhangxingmin

push

parent ee269804
......@@ -55,13 +55,13 @@
// JSONObject body = jsonObject.getJSONObject("Body");
// String taskId = body.getString("TaskId");
// if (taskId == null || taskId.isEmpty()) {
// throw new RuntimeException("启动录制失败,未返回 TaskId,响应:" + responseData);
// throw new BusinessException("启动录制失败,未返回 TaskId,响应:" + responseData);
// }
// log.info("启动录制成功, TaskId: {}", taskId);
// return taskId;
// } catch (Exception e) {
// log.error("启动录制失败", e);
// throw new RuntimeException("启动云端录制失败: " + e.getMessage(), e);
// throw new BusinessException("启动云端录制失败: " + e.getMessage(), e);
// }
// }
//
......@@ -74,7 +74,7 @@
// log.info("停止录制成功, TaskId: {}", taskId);
// } catch (Exception e) {
// log.error("停止录制失败", e);
// throw new RuntimeException("停止云端录制失败: " + e.getMessage(), e);
// throw new BusinessException("停止云端录制失败: " + e.getMessage(), e);
// }
// }
//
......@@ -124,7 +124,7 @@
// return info;
// } catch (Exception e) {
// log.error("查询录制信息失败", e);
// throw new RuntimeException("查询录制信息失败: " + e.getMessage(), e);
// throw new BusinessException("查询录制信息失败: " + e.getMessage(), e);
// }
// }
//}
\ No newline at end of file
......@@ -176,7 +176,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
RoomRedisInfoDTO roomRedisInfoDTO = redisUtil.getCacheObject(RedisEnum.ROOM.getPrefix() + session.getRoomId());
if (roomRedisInfoDTO == null) {
log.error("【加入会话】会话发起者缓存信息不存在,roomId={}", session.getRoomId());
throw new RuntimeException("会话发起者登录信息失效,建议联系会话发起者再次发起");
throw new BusinessException("会话发起者登录信息失效,建议联系会话发起者再次发起");
}
joinResponse.setUserId(roomRedisInfoDTO.getUserId());
joinResponse.setToken(roomRedisInfoDTO.getToken());
......@@ -203,19 +203,19 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
CoSession session = iCoSessionService.getOne(wrapper);
if (session == null) {
log.error("【加入会话-内部】未找到会话,roomPwd={}", roomPwd);
throw new RuntimeException("房间密码(共享码)错误,或客户未发起会话");
throw new BusinessException("房间密码(共享码)错误,或客户未发起会话");
}
log.info("【加入会话-内部】找到会话, roomId={}, status={}, currentHolder={}:{}",
session.getRoomId(), session.getStatus(), session.getControlHolderType(), session.getControlHolderId());
if (CoSessionStatusEnum.YJS.getItemValue().equals(session.getStatus())) {
log.warn("【加入会话-内部】会话已结束,roomId={}", session.getRoomId());
throw new RuntimeException("会话已结束,不能再次加入房间");
throw new BusinessException("会话已结束,不能再次加入房间");
}
if (StringUtils.isNotBlank(session.getParticipantId()) && !session.getParticipantId().equals(participantId)) {
log.warn("【加入会话-内部】房间被占用,当前参与者={}, 新参与者={}",
session.getParticipantId(), participantId);
throw new RuntimeException("当前房间被占用,不能加入到房间");
throw new BusinessException("当前房间被占用,不能加入到房间");
}
// 若为待开始状态,设置开始时间并转移控制权
......@@ -360,7 +360,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
CoSession session = iCoSessionService.getOne(wrapper);
if (session == null) {
log.error("【切换控制权-内部】会话不存在, roomId={}", roomId);
throw new RuntimeException("会话不存在");
throw new BusinessException("会话不存在");
}
log.info("【切换控制权-内部】找到会话, 当前控制者={}:{}", session.getControlHolderType(), session.getControlHolderId());
......@@ -418,7 +418,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
CoSession session = iCoSessionService.getOne(wrapper);
if (session == null) {
log.error("【获取当前控制者】会话不存在, roomId={}", roomId);
throw new RuntimeException("会话不存在");
throw new BusinessException("会话不存在");
}
if (roomRedisInfoDTO == null) {
roomRedisInfoDTO = new RoomRedisInfoDTO();
......@@ -454,7 +454,7 @@ public class ApiCoSessionServiceImpl implements ApiCoSessionService {
CoSession session = iCoSessionService.getOne(wrapper);
if (session == null) {
log.error("【更新当前页面】会话不存在, roomId={}", roomId);
throw new RuntimeException("会话不存在");
throw new BusinessException("会话不存在");
}
String history = session.getPageHistory();
if (history == null || history.equals("[]") || history.isEmpty()) {
......
......@@ -2,6 +2,7 @@ package com.yd.communication.service.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yd.common.enums.CommonEnum;
import com.yd.common.exception.BusinessException;
import com.yd.common.utils.RandomStringGenerator;
import com.yd.communication.service.model.RecordingTask;
import com.yd.communication.service.dao.RecordingTaskMapper;
......@@ -69,7 +70,7 @@ public class RecordingTaskServiceImpl extends ServiceImpl<RecordingTaskMapper, R
wrapper.eq(RecordingTask::getTaskId, taskId);
RecordingTask task = this.getOne(wrapper);
if (task == null) {
throw new RuntimeException("录制任务不存在");
throw new BusinessException("录制任务不存在");
}
// 模拟停止录制
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment