|
@@ -618,7 +618,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean deleteWhiteboard(String roomId, String whiteBoardId) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean deleteWhiteboard(String roomId, String whiteBoardId) throws Exception {
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(whiteBoardId != null, "whiteBoardId must't be null");
|
|
CheckUtils.checkArgument(whiteBoardId != null, "whiteBoardId must't be null");
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
@@ -657,7 +657,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<RoomResult.WhiteboardResult> getWhiteboard(String roomId) throws ApiException, Exception {
|
|
|
|
|
|
+ public List<RoomResult.WhiteboardResult> getWhiteboard(String roomId){
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
|
|
|
@@ -674,7 +674,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean turnWhiteBoardPage(String roomId, String whiteBoardId, int page) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean turnWhiteBoardPage(String roomId, String whiteBoardId, int page) throws Exception {
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(whiteBoardId != null, "whiteBoardId must't be null");
|
|
CheckUtils.checkArgument(whiteBoardId != null, "whiteBoardId must't be null");
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
@@ -692,7 +692,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class,isolation = Isolation.SERIALIZABLE)
|
|
@Transactional(rollbackFor = Exception.class,isolation = Isolation.SERIALIZABLE)
|
|
- public Boolean controlDevice(String roomId, String userId, DeviceTypeEnum typeEnum, boolean enable) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean controlDevice(String roomId, String userId, DeviceTypeEnum typeEnum, boolean enable) throws Exception {
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(userId != null, "userId must't be null");
|
|
CheckUtils.checkArgument(userId != null, "userId must't be null");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
@@ -771,7 +771,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean approveControlDevice(String roomId, String ticket) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean approveControlDevice(String roomId, String ticket) throws Exception {
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
String userId = authUser.getId().toString();
|
|
String userId = authUser.getId().toString();
|
|
@@ -795,7 +795,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean rejectControlDevice(String roomId, String ticket) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean rejectControlDevice(String roomId, String ticket) throws Exception {
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
String userId = authUser.getId().toString();
|
|
String userId = authUser.getId().toString();
|
|
@@ -811,8 +811,8 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
|
- public Boolean syncDeviceState(String roomId, DeviceTypeEnum type, boolean enable) throws ApiException, Exception {
|
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class,isolation = Isolation.SERIALIZABLE)
|
|
|
|
+ public Boolean syncDeviceState(String roomId, DeviceTypeEnum type, boolean enable) throws Exception {
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
@@ -837,7 +837,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<RoomResult.MemberResult> getMembers(String roomId) throws ApiException, Exception {
|
|
|
|
|
|
+ public List<RoomResult.MemberResult> getMembers(String roomId){
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
List<RoomMember> roomMemberList = roomMemberDao.findByRid(roomId);
|
|
List<RoomMember> roomMemberList = roomMemberDao.findByRid(roomId);
|
|
if(roomMemberList != null && roomMemberList.size() > 0){
|
|
if(roomMemberList != null && roomMemberList.size() > 0){
|
|
@@ -885,7 +885,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.SERIALIZABLE)
|
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.SERIALIZABLE)
|
|
- public Boolean approveSpeech(String roomId, String ticket) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean approveSpeech(String roomId, String ticket) throws Exception {
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
@@ -929,7 +929,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean rejectSpeech(String roomId, String ticket) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean rejectSpeech(String roomId, String ticket) throws Exception {
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
@@ -962,7 +962,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}*/
|
|
}*/
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean transfer(String roomId, String userId) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean transfer(String roomId, String userId) throws Exception {
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(userId != null, "userId must't be null");
|
|
CheckUtils.checkArgument(userId != null, "userId must't be null");
|
|
CheckUtils.checkArgument(!userId.equals(userId), "can't set self role");
|
|
CheckUtils.checkArgument(!userId.equals(userId), "can't set self role");
|
|
@@ -987,7 +987,6 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
roomMemberDao.updateRoleByRidAndUid(roomId, userId, Student.getValue());
|
|
roomMemberDao.updateRoleByRidAndUid(roomId, userId, Student.getValue());
|
|
-// roomMemberDao.updateRoleByRidAndUid(roomId, userId, RoleEnum.RoleAssistant.getValue());
|
|
|
|
|
|
|
|
AssistantTransferMessage msg = new AssistantTransferMessage();
|
|
AssistantTransferMessage msg = new AssistantTransferMessage();
|
|
msg.setOpUserId(userId);
|
|
msg.setOpUserId(userId);
|
|
@@ -1001,7 +1000,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean inviteUpgradeRole(String roomId, String targetUserId, int targetRole) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean inviteUpgradeRole(String roomId, String targetUserId, int targetRole) throws Exception {
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(targetUserId != null, "userId must't be null");
|
|
CheckUtils.checkArgument(targetUserId != null, "userId must't be null");
|
|
CheckUtils.checkArgument(roomMemberDao.existsByRidAndUid(roomId, targetUserId), "room member not exist");
|
|
CheckUtils.checkArgument(roomMemberDao.existsByRidAndUid(roomId, targetUserId), "room member not exist");
|
|
@@ -1014,8 +1013,6 @@ public class RoomServiceImpl implements RoomService {
|
|
throw new ApiException(ErrorEnum.ERR_USER_NOT_EXIST_IN_ROOM);
|
|
throw new ApiException(ErrorEnum.ERR_USER_NOT_EXIST_IN_ROOM);
|
|
}
|
|
}
|
|
|
|
|
|
-// checkOverMax(roomId, targetUser.get(0), targetRole);
|
|
|
|
-
|
|
|
|
String ticket = IdentifierUtils.uuid();
|
|
String ticket = IdentifierUtils.uuid();
|
|
|
|
|
|
UpgradeRoleTaskInfo taskInfo = new UpgradeRoleTaskInfo();
|
|
UpgradeRoleTaskInfo taskInfo = new UpgradeRoleTaskInfo();
|
|
@@ -1040,7 +1037,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean approveUpgradeRole(String roomId, String ticket) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean approveUpgradeRole(String roomId, String ticket) throws Exception {
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
@@ -1082,7 +1079,7 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Boolean rejectUpgradeRole(String roomId, String ticket) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean rejectUpgradeRole(String roomId, String ticket) throws Exception {
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
@@ -1103,7 +1100,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.SERIALIZABLE)
|
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.SERIALIZABLE)
|
|
- public Boolean changeRole(String roomId, String targetUserId, int targetRole) throws ApiException, Exception {
|
|
|
|
|
|
+ public Boolean changeRole(String roomId, String targetUserId, int targetRole) throws Exception {
|
|
|
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
CheckUtils.checkArgument(targetUserId != null, "userId must't be null");
|
|
CheckUtils.checkArgument(targetUserId != null, "userId must't be null");
|