|
@@ -137,10 +137,10 @@ public class RoomServiceImpl implements RoomService {
|
|
|
}
|
|
|
if (memberList.isEmpty()) {
|
|
|
saveRoomMember(userId,sysUser.getAvatar(), realName, recordedRoomId, Student.getValue(), true,true, date);
|
|
|
- IMApiResultInfo resultInfo = imHelper.joinGroup(new String[]{userId}, recordedRoomId, recordedRoomId);
|
|
|
+ /*IMApiResultInfo resultInfo = imHelper.joinGroup(new String[]{userId}, recordedRoomId, recordedRoomId);
|
|
|
if (!resultInfo.isSuccess()) {
|
|
|
throw new ApiException(ErrorEnum.ERR_CREATE_ROOM_ERROR, resultInfo.getErrorMessage());
|
|
|
- }
|
|
|
+ }*/
|
|
|
userResult.setMicrophone(true);
|
|
|
userResult.setCamera(true);
|
|
|
userResult.setHandUp(false);
|
|
@@ -221,14 +221,14 @@ public class RoomServiceImpl implements RoomService {
|
|
|
List<Room> roomList = roomDao.findByRid(roomId);
|
|
|
if (roomList.isEmpty()) {
|
|
|
saveRoom(roomId, roomId, curTime, null);
|
|
|
- IMApiResultInfo resultInfo = imHelper.createGroup(new String[]{userId}, roomId, roomId);
|
|
|
+ /*IMApiResultInfo resultInfo = imHelper.createGroup(new String[]{userId}, roomId, roomId);
|
|
|
if (!resultInfo.isSuccess()) {
|
|
|
log.error("joinRoom IM error: roomId={}, {}", roomId, resultInfo.getErrorMessage());
|
|
|
throw new ApiException(ErrorEnum.ERR_CREATE_ROOM_ERROR, resultInfo.getErrorMessage());
|
|
|
}
|
|
|
-// else {
|
|
|
-// scheduleManager.addExpiredTask(this, roomId);
|
|
|
-// }
|
|
|
+ else {
|
|
|
+ scheduleManager.addExpiredTask(this, roomId);
|
|
|
+ }*/
|
|
|
}/* else {
|
|
|
display = roomList.get(0).getDisplay();
|
|
|
}*/
|
|
@@ -252,10 +252,10 @@ public class RoomServiceImpl implements RoomService {
|
|
|
roleEnum = Student;
|
|
|
}
|
|
|
saveRoomMember(userId,sysUser.getAvatar(), realName, roomId, roleEnum.getValue(), !isDisableCamera,!isMusicMode, curTime);
|
|
|
- IMApiResultInfo resultInfo = imHelper.joinGroup(new String[]{userId}, roomId, roomId);
|
|
|
+ /*IMApiResultInfo resultInfo = imHelper.joinGroup(new String[]{userId}, roomId, roomId);
|
|
|
if (!resultInfo.isSuccess()) {
|
|
|
throw new ApiException(ErrorEnum.ERR_CREATE_ROOM_ERROR, resultInfo.getErrorMessage());
|
|
|
- }
|
|
|
+ }*/
|
|
|
userResult.setMicrophone(true);
|
|
|
userResult.setCamera(!isDisableCamera);
|
|
|
userResult.setHandUp(false);
|
|
@@ -499,8 +499,12 @@ public class RoomServiceImpl implements RoomService {
|
|
|
}*/
|
|
|
|
|
|
if (roomMemberDao.countByRid(roomId) == 1) {
|
|
|
- IMApiResultInfo apiResultInfo = null;
|
|
|
+ roomMemberDao.deleteUserByRidAndUid(roomId, userId);
|
|
|
+ roomDao.deleteByRid(roomId);
|
|
|
+ /*IMApiResultInfo apiResultInfo = null;
|
|
|
try {
|
|
|
+ roomMemberDao.deleteUserByRidAndUid(roomId, userId);
|
|
|
+ roomDao.deleteByRid(roomId);
|
|
|
apiResultInfo = imHelper.dismiss(userId, roomId);
|
|
|
if (apiResultInfo.getCode() == 200) {
|
|
|
roomMemberDao.deleteUserByRidAndUid(roomId, userId);
|
|
@@ -514,9 +518,11 @@ public class RoomServiceImpl implements RoomService {
|
|
|
} catch (Exception e) {
|
|
|
log.error("{} exit {} room error: {}", userId, roomId, e.getMessage());
|
|
|
throw new ApiException(ErrorEnum.ERR_EXIT_ROOM_ERROR, e.getMessage());
|
|
|
- }
|
|
|
+ }*/
|
|
|
} else {
|
|
|
- IMApiResultInfo apiResultInfo = null;
|
|
|
+ roomMemberDao.deleteUserByRidAndUid(roomId, userId);
|
|
|
+
|
|
|
+ /*IMApiResultInfo apiResultInfo = null;
|
|
|
try {
|
|
|
apiResultInfo = imHelper.quit(new String[]{userId}, roomId);
|
|
|
if (apiResultInfo.isSuccess()) {
|
|
@@ -532,7 +538,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
} catch (Exception e) {
|
|
|
log.error("leave room error: roomId={}, {}", roomId, e.getMessage());
|
|
|
throw new ApiException(ErrorEnum.ERR_EXIT_ROOM_ERROR);
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
userDao.deleteByUid(userId);
|
|
|
// this.signOut(Long.parseLong(roomId));
|
|
@@ -568,7 +574,10 @@ public class RoomServiceImpl implements RoomService {
|
|
|
log.info("levelRecorded: roomId={}, role={}", roomId, RoleEnum.getEnumByValue(userRole));
|
|
|
|
|
|
if (roomMemberDao.countByRid(roomId) == 1) {
|
|
|
- IMApiResultInfo apiResultInfo = null;
|
|
|
+ roomMemberDao.deleteUserByRidAndUid(roomId, userId);
|
|
|
+ roomDao.deleteByRid(roomId);
|
|
|
+
|
|
|
+ /*IMApiResultInfo apiResultInfo = null;
|
|
|
try {
|
|
|
apiResultInfo = imHelper.dismiss(userId, roomId);
|
|
|
if (apiResultInfo.getCode() == 200) {
|
|
@@ -582,9 +591,11 @@ public class RoomServiceImpl implements RoomService {
|
|
|
} catch (Exception e) {
|
|
|
log.error("levelRecorded {} exit {} room error: {}", userId, roomId, e.getMessage());
|
|
|
throw new ApiException(ErrorEnum.ERR_EXIT_ROOM_ERROR, e.getMessage());
|
|
|
- }
|
|
|
+ }*/
|
|
|
} else {
|
|
|
- IMApiResultInfo apiResultInfo = null;
|
|
|
+ roomMemberDao.deleteUserByRidAndUid(roomId, userId);
|
|
|
+
|
|
|
+ /*IMApiResultInfo apiResultInfo = null;
|
|
|
try {
|
|
|
apiResultInfo = imHelper.quit(new String[]{userId}, roomId);
|
|
|
if (apiResultInfo.isSuccess()) {
|
|
@@ -600,7 +611,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
} catch (Exception e) {
|
|
|
log.error("levelRecorded leave room error: roomId={}, {}", roomId, e.getMessage());
|
|
|
throw new ApiException(ErrorEnum.ERR_EXIT_ROOM_ERROR);
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
userDao.deleteByUid(userId);
|
|
|
if(registrationId != null){
|