|
@@ -479,8 +479,8 @@ public class RoomServiceImpl implements RoomService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @Transactional(rollbackFor = Exception.class,isolation = Isolation.SERIALIZABLE)
|
|
|
- public Boolean kickMember(ReqUserData data) throws ApiException, Exception {
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public Boolean kickMember(ReqUserData data) throws Exception {
|
|
|
StudentExamResultApiDto examResult = eduUserFeignService.getExamResult(data.getRegistrationId());
|
|
|
String roomId = examResult.getRoomId();
|
|
|
|
|
@@ -499,30 +499,16 @@ public class RoomServiceImpl implements RoomService {
|
|
|
UserInfo userInfo = userDao.findByUid(data.getUserId());
|
|
|
if (userInfo != null) {
|
|
|
msg.setUserName(userInfo.getName());
|
|
|
- }/*
|
|
|
- if("recorded".equals(data.getType())){
|
|
|
- msg.setRoomId("recorded" + roomId);
|
|
|
- }*/
|
|
|
- imHelper.stopRecord(roomId);
|
|
|
+ }
|
|
|
IMApiResultInfo apiResultInfo = imHelper.publishMessage(userId, roomId, msg, 1);
|
|
|
if (!apiResultInfo.isSuccess()) {
|
|
|
throw new ApiException(ErrorEnum.ERR_MESSAGE_ERROR);
|
|
|
}
|
|
|
-// Thread.sleep(50);
|
|
|
log.info("published msg: msg={}", msg);
|
|
|
- /*List<Room> roomList = roomDao.findByRid(roomId);
|
|
|
- if (kickedUsers.get(0).getRole() != Student.getValue() && isUserDisplay(roomList.get(0), userId)) {
|
|
|
- updateDisplay(roomId, userId, "", 1);
|
|
|
- } else {
|
|
|
- log.info("don't update display: room={}, userRole={}", roomId, RoleEnum.getEnumByValue(kickedUsers.get(0).getRole()));
|
|
|
- }*/
|
|
|
eduUserFeignService.upsetStudentAttendance(data.getRegistrationId(),1);
|
|
|
+ imHelper.stopRecord(roomId);
|
|
|
}
|
|
|
userDao.deleteByUid(data.getUserId());
|
|
|
- /*IMApiResultInfo apiResultInfo = imHelper.quit(new String[]{data.getUserId()}, roomId);
|
|
|
- if (!apiResultInfo.isSuccess()) {
|
|
|
- throw new ApiException(ErrorEnum.ERR_EXIT_ROOM_ERROR, apiResultInfo.getErrorMessage());
|
|
|
- }*/
|
|
|
return true;
|
|
|
}
|
|
|
|