|
@@ -103,7 +103,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
@Value("${auth.sysconfig.tenantId}")
|
|
|
private Integer lesseeOrganId;
|
|
|
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
+ @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
|
@Override
|
|
|
public RoomResult joinRoom(String userName, String roomId, boolean isAudience, boolean isDisableCamera,boolean isMusicMode) throws ApiException, Exception {
|
|
|
CheckUtils.checkArgument(userName != null, "userName must't be null");
|
|
@@ -851,6 +851,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
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");
|
|
@@ -862,9 +863,12 @@ public class RoomServiceImpl implements RoomService {
|
|
|
if (type.equals(DeviceTypeEnum.Camera)) {
|
|
|
result = roomMemberDao.updateCameraByRidAndUid(roomId, userId, enable);
|
|
|
deviceResourceMessage = new DeviceStateChangedMessage(type.ordinal(), enable);
|
|
|
- } else {
|
|
|
+ } else if (type.equals(DeviceTypeEnum.Microphone)){
|
|
|
result = roomMemberDao.updateMicByRidAndUid(roomId, userId, enable);
|
|
|
deviceResourceMessage = new DeviceStateChangedMessage(type.ordinal(), enable);
|
|
|
+ }else {
|
|
|
+ result = roomMemberDao.updateMusicByRidAndUid(roomId, userId, enable);
|
|
|
+ deviceResourceMessage = new DeviceStateChangedMessage(type.ordinal(), enable);
|
|
|
}
|
|
|
deviceResourceMessage.setUserId(userId);
|
|
|
imHelper.publishMessage(userId, roomId, deviceResourceMessage, 1);
|