|
@@ -213,7 +213,7 @@ public class ImServiceImpl implements ImService {
|
|
|
.builder()
|
|
|
.type(deviceControl.getDeviceType().ordinal())
|
|
|
.enable(deviceControl.getEnable())
|
|
|
- .targetId(deviceControl.getImUserId())
|
|
|
+ .targetId(deviceControl.getUserId())
|
|
|
.targetName(teacher.getRealName())
|
|
|
.songId(Optional.ofNullable(deviceControl.getAccompanimentId()).map(String::valueOf).orElse(null))
|
|
|
.songVolume(deviceControl.getSoundVolume())
|
|
@@ -227,7 +227,7 @@ public class ImServiceImpl implements ImService {
|
|
|
// 腾讯云消息推送
|
|
|
RTCRoomMessage message = RTCRoomMessage.builder()
|
|
|
.objectName(RTCRoomMessage.CONTROL_DEVICE_NOTIFY_MESSAGE)
|
|
|
- .fromUserId(deviceControl.getImUserId())
|
|
|
+ .fromUserId(deviceControl.getUserId())
|
|
|
.toChatRoomId(roomId)
|
|
|
.content(notifyContent)
|
|
|
.isPersisted(1)
|
|
@@ -236,14 +236,14 @@ public class ImServiceImpl implements ImService {
|
|
|
|
|
|
if(deviceControl.getEnable()){
|
|
|
ImNetworkDeviceStateChangedMessage deviceResourceMessage = new ImNetworkDeviceStateChangedMessage(deviceControl.getDeviceType().ordinal(),true);
|
|
|
- deviceResourceMessage.setUserId(deviceControl.getImUserId());
|
|
|
+ deviceResourceMessage.setUserId(deviceControl.getUserId());
|
|
|
switch (deviceControl.getDeviceType()) {
|
|
|
case EXAM_SONG:
|
|
|
- ImNetworkRoomMusicSheetDownloadData msg = imNetworkRoomMemberStatusService.getMemberExamSong(roomId, deviceControl.getImUserId());
|
|
|
+ ImNetworkRoomMusicSheetDownloadData msg = imNetworkRoomMemberStatusService.getMemberExamSong(roomId, deviceControl.getUserId());
|
|
|
msg.setEnable(true);
|
|
|
imNetworkRoomMemberStatusService.lambdaUpdate()
|
|
|
.eq(ImNetworkRoomMemberStatus::getRoomId,roomId)
|
|
|
- .eq(ImNetworkRoomMemberStatus::getImUserId,deviceControl.getImUserId())
|
|
|
+ .eq(ImNetworkRoomMemberStatus::getImUserId,deviceControl.getUserId())
|
|
|
.set(ImNetworkRoomMemberStatus::getMusicSheetDownloadJson,JSON.toJSONString(msg)).update();
|
|
|
|
|
|
// 消息发送
|
|
@@ -252,13 +252,13 @@ public class ImServiceImpl implements ImService {
|
|
|
pluginService.sendChatRoomMessage(message.objectName(RTCRoomMessage.CONTROL_DEVICE_NOTIFY_MESSAGE).content(notifyContent));
|
|
|
} else {
|
|
|
// 融云推送
|
|
|
- imHelper.publishMessage(deviceControl.getImUserId(), roomId, deviceResourceMessage, 1);
|
|
|
+ imHelper.publishMessage(deviceControl.getUserId(), roomId, deviceResourceMessage, 1);
|
|
|
}
|
|
|
break;
|
|
|
case MUSIC_SHEET:
|
|
|
case ACCOMPANIMENT:
|
|
|
deviceResourceMessage.setMusicSheetAccompanimentId(deviceControl.getAccompanimentId());
|
|
|
- deviceResourceMessage.setUserId(deviceControl.getImUserId());
|
|
|
+ deviceResourceMessage.setUserId(deviceControl.getUserId());
|
|
|
deviceResourceMessage.setSoundVolume(deviceControl.getSoundVolume());
|
|
|
if (TencentCloudRTCPlugin.PLUGIN_NAME.equals(pluginService.pluginName())) {
|
|
|
// 腾讯云推送
|
|
@@ -280,14 +280,14 @@ public class ImServiceImpl implements ImService {
|
|
|
message1.setType(deviceControl.getDeviceType().ordinal());
|
|
|
message1.setOpUserId(teacher.getImUserId());
|
|
|
message1.setOpUserName(teacher.getRealName());
|
|
|
- imHelper.publishMessage(teacher.getImUserId(), deviceControl.getImUserId(), roomId, message1);
|
|
|
+ imHelper.publishMessage(teacher.getImUserId(), deviceControl.getUserId(), roomId, message1);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
}else {
|
|
|
ImNetworkRoomMember roomMember = Optional.ofNullable(imNetworkRoomMemberService.lambdaQuery()
|
|
|
.eq(ImNetworkRoomMember::getRoomId,roomId)
|
|
|
- .eq(ImNetworkRoomMember::getUserId,deviceControl.getImUserId())
|
|
|
+ .eq(ImNetworkRoomMember::getUserId,deviceControl.getUserId())
|
|
|
.eq(ImNetworkRoomMember::getRole,RoleEnum.RoleStudent.getValue()).last("LIMIT 1").one())
|
|
|
.orElseThrow(()-> new BizException("用户不在房间内"));
|
|
|
switch (deviceControl.getDeviceType()) {
|
|
@@ -323,7 +323,7 @@ public class ImServiceImpl implements ImService {
|
|
|
} else {
|
|
|
// 融云消息
|
|
|
ImNetworkDeviceStateChangedMessage deviceResourceMessage = new ImNetworkDeviceStateChangedMessage(deviceControl.getDeviceType().ordinal(),deviceControl.getEnable());
|
|
|
- deviceResourceMessage.setUserId(deviceControl.getImUserId());
|
|
|
+ deviceResourceMessage.setUserId(deviceControl.getUserId());
|
|
|
deviceResourceMessage.setUserName(teacher.getRealName());
|
|
|
imHelper.publishMessage(teacher.getImUserId(), roomId, deviceResourceMessage, 1);
|
|
|
}
|