|
@@ -845,7 +845,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
throw new ApiException(ErrorEnum.ERR_REQUEST_PARA_ERR);
|
|
|
}
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
- log.info("controlDevice: userId={}, typeEnum={}, onOff={}", userId, typeEnum, enable);
|
|
|
+ log.info("controlDevice: userId = {}, typeEnum = {}, enable = {} ,roomId = {}", userId, typeEnum, enable, roomId);
|
|
|
|
|
|
if (enable) {
|
|
|
if (typeEnum.equals(DeviceTypeEnum.ExamSong)){
|
|
@@ -866,12 +866,12 @@ public class RoomServiceImpl implements RoomService {
|
|
|
long scheduleId = Long.parseLong(roomId.substring(1));
|
|
|
//关闭所有曲目播放
|
|
|
courseScheduleStudentMusicScoreDao.closePlayStatus(scheduleId,Integer.parseInt(userId),null);
|
|
|
- //原音
|
|
|
- courseScheduleStudentMusicScoreDao.openPlayStatus(scheduleId,data.getMusicScoreAccompanimentId(),Integer.parseInt(userId));
|
|
|
DeviceStateChangedMessage deviceResourceMessage = new DeviceStateChangedMessage(typeEnum.ordinal(), enable);
|
|
|
deviceResourceMessage.setMusicScoreAccompanimentId(data.getMusicScoreAccompanimentId());
|
|
|
deviceResourceMessage.setUserId(userId);
|
|
|
deviceResourceMessage.setSoundVolume(data.getSoundVolume());
|
|
|
+ //原音
|
|
|
+ courseScheduleStudentMusicScoreDao.openPlayStatus(scheduleId, data.getMusicScoreAccompanimentId(), Integer.parseInt(userId));
|
|
|
imHelper.publishMessage(authUser.getId().toString(), roomId, deviceResourceMessage, 1);
|
|
|
}else if(typeEnum.equals(DeviceTypeEnum.MusicScoreAccompaniment)){
|
|
|
long scheduleId = Long.parseLong(roomId.substring(1));
|