|
@@ -8,7 +8,6 @@ import com.google.common.collect.Maps;
|
|
|
import com.microsvc.toolkit.middleware.rtc.RTCRoomPluginContext;
|
|
|
import com.microsvc.toolkit.middleware.rtc.RTCRoomPluginService;
|
|
|
import com.microsvc.toolkit.middleware.rtc.enums.EMemberAction;
|
|
|
-import com.microsvc.toolkit.middleware.rtc.enums.EMemberRole;
|
|
|
import com.microsvc.toolkit.middleware.rtc.impl.TencentCloudRTCPlugin;
|
|
|
import com.microsvc.toolkit.middleware.rtc.message.ImGroupMemberWrapper;
|
|
|
import com.microsvc.toolkit.middleware.rtc.message.RTCRoomMessage;
|
|
@@ -1441,25 +1440,22 @@ public class RoomServiceImpl implements RoomService {
|
|
|
data.setUserId(e.getUid());
|
|
|
controlDevice(data);
|
|
|
}
|
|
|
- DeviceTypeEnum typeEnum;
|
|
|
boolean enable;
|
|
|
if (data.getCameraOn() != null) {
|
|
|
- typeEnum = DeviceTypeEnum.Camera;
|
|
|
enable = data.getCameraOn();
|
|
|
+ roomMemberDao.updateCameraByRidAndRole(data.getRoomId(), RoleStudent.getValue(), enable);
|
|
|
} else if (data.getMicrophoneOn() != null) {
|
|
|
- typeEnum = DeviceTypeEnum.Microphone;
|
|
|
enable = data.getMicrophoneOn();
|
|
|
+ roomMemberDao.updateMicByRidAndRole(data.getRoomId(), RoleStudent.getValue(), enable);
|
|
|
} else if (data.getMusicModeOn() != null) {
|
|
|
- typeEnum = DeviceTypeEnum.MusicMode;
|
|
|
enable = data.getMusicModeOn();
|
|
|
+ roomMemberDao.updateMusicByRidAndRole(data.getRoomId(), RoleStudent.getValue(), enable);
|
|
|
} else if (data.getHandUpOn() != null) {
|
|
|
- typeEnum = DeviceTypeEnum.HandUp;
|
|
|
enable = data.getHandUpOn();
|
|
|
+ roomMemberDao.updateHandByRidAndRole(data.getRoomId(), RoleStudent.getValue(), enable);
|
|
|
} else
|
|
|
return true;
|
|
|
|
|
|
- roomMemberDao.updateAll(data.getUserId(),RoleStudent.getValue(),typeEnum.getValue(),enable);
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
|