|
@@ -77,7 +77,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
@Transactional
|
|
|
@Override
|
|
|
public RoomResult joinRoom(String userName, String roomId, boolean isAudience, boolean isDisableCamera) throws ApiException, Exception {
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
|
|
|
CheckUtils.checkArgument(userName != null, "userName must't be null");
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
@@ -181,7 +181,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
// JwtToken jwtToken = tokenHelper.createJwtToken(jwtUser);
|
|
|
IMTokenInfo tokenInfo = imHelper.getToken(userId, userId, "");
|
|
|
if (tokenInfo.isSuccess()) {
|
|
|
- roomResult.setImToken(tokenInfo.getToken());
|
|
|
+ roomResult.setImToken(tokenInfo.getAuthenticationValue());
|
|
|
} else {
|
|
|
throw new ApiException(ErrorEnum.ERR_IM_TOKEN_ERROR, tokenInfo.getErrorMessage());
|
|
|
}
|
|
@@ -220,7 +220,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
@Transactional
|
|
|
@Override
|
|
|
public Boolean leaveRoom(String roomId) throws Exception {
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser user = sysUserFeignService.queryUserInfo();
|
|
|
String userId = user.getId().toString();
|
|
|
|
|
@@ -327,7 +327,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
public Boolean downgrade(String roomId, List<ReqChangeUserRoleData.ChangedUser> users) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(users.size() > 0, "the changed user list must't be null");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
List<Room> roomList = roomDao.findByRid(roomId);
|
|
@@ -377,7 +377,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
|
|
|
@Override
|
|
|
public Boolean kickMember(String roomId) throws ApiException, Exception {
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
CheckUtils.checkArgument(userId != null, "userId must't be null");
|
|
@@ -417,7 +417,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
|
|
|
@Override
|
|
|
public Boolean display(String roomId, int type, String uri) throws ApiException, Exception {
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
log.info("display in room: {}, type = {}, uri = {}", roomId, type, uri);
|
|
@@ -482,7 +482,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
public String createWhiteBoard(String roomId) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
CheckUtils.checkArgument(roomMemberDao.existsByRidAndUid(roomId, userId), "room member not exist");
|
|
@@ -526,7 +526,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
public Boolean deleteWhiteboard(String roomId, String whiteBoardId) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(whiteBoardId != null, "whiteBoardId must't be null");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
|
|
@@ -583,7 +583,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
public Boolean turnWhiteBoardPage(String roomId, String whiteBoardId, int page) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(whiteBoardId != null, "whiteBoardId must't be null");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
List<Room> roomList = roomDao.findByRid(roomId);
|
|
@@ -603,7 +603,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
CheckUtils.checkArgument(userId != null, "userId must't be null");
|
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
CheckUtils.checkArgument(roomMemberDao.existsByRidAndUid(roomId, userId), "room member not exist");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
|
|
|
log.info("controlDevice: userId={}, typeEnum={}, onOff={}", userId, typeEnum, enable);
|
|
@@ -644,7 +644,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
@Override
|
|
|
public Boolean approveControlDevice(String roomId, String ticket) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
log.info("approveControlDevice: ticket={}", ticket);
|
|
@@ -669,7 +669,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
@Override
|
|
|
public Boolean rejectControlDevice(String roomId, String ticket) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
|
|
@@ -687,7 +687,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
public Boolean syncDeviceState(String roomId, DeviceTypeEnum type, boolean enable) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
|
|
@@ -720,7 +720,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
public Boolean applySpeech(String roomId) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
List<RoomMember> assistants = roomMemberDao.findByRidAndRole(roomId, RoleEnum.RoleAssistant.getValue());
|
|
@@ -755,7 +755,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
public Boolean approveSpeech(String roomId, String ticket) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
|
|
@@ -800,7 +800,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
public Boolean rejectSpeech(String roomId, String ticket) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
ScheduledTaskInfo taskInfo = scheduleManager.executeTask(ticket);
|
|
@@ -874,7 +874,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(targetUserId != null, "userId must't be null");
|
|
|
CheckUtils.checkArgument(roomMemberDao.existsByRidAndUid(roomId, targetUserId), "room member not exist");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
log.info("inviteUpgradeRole roomId = {}, targetUserId = {}, targetRole = {}", roomId, targetUserId, targetRole);
|
|
@@ -914,7 +914,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
UpgradeRoleTaskInfo taskInfo = (UpgradeRoleTaskInfo) scheduleManager.executeTask(ticket);
|
|
@@ -957,7 +957,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(ticket != null, "ticket must't be null");
|
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
UpgradeRoleTaskInfo taskInfo = (UpgradeRoleTaskInfo) scheduleManager.executeTask(ticket);
|
|
@@ -981,7 +981,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
CheckUtils.checkArgument(RoleEnum.getEnumByValue(targetRole).equals(RoleEnum.RoleTeacher), "only set to teacher");
|
|
|
CheckUtils.checkArgument(roomMemberDao.existsByRidAndUid(roomId, targetUserId), "room member not exist");
|
|
|
- String token = SecurityUtils.getToken();
|
|
|
+ String token = SecurityUtils.getAuthenticationValue();
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
String userId = authUser.getId().toString();
|
|
|
|