|
@@ -856,7 +856,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
//关闭所有曲目播放
|
|
|
courseScheduleStudentMusicScoreDao.closePlayStatus(scheduleId,Integer.parseInt(userId),null);
|
|
|
//原音
|
|
|
- courseScheduleStudentMusicScoreDao.openPlayStatus(scheduleId,authUser.getId(),data.getMusicScoreAccompanimentId());
|
|
|
+ courseScheduleStudentMusicScoreDao.openPlayStatus(scheduleId,data.getMusicScoreAccompanimentId());
|
|
|
DeviceStateChangedMessage deviceResourceMessage = new DeviceStateChangedMessage(typeEnum.ordinal(), enable);
|
|
|
deviceResourceMessage.setMusicScoreAccompanimentId(data.getMusicScoreAccompanimentId());
|
|
|
deviceResourceMessage.setUserId(userId);
|
|
@@ -865,7 +865,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
long scheduleId = Long.parseLong(roomId.substring(1));
|
|
|
//关闭所有曲目播放
|
|
|
courseScheduleStudentMusicScoreDao.closePlayStatus(scheduleId,Integer.parseInt(userId),null);
|
|
|
- courseScheduleStudentMusicScoreDao.openAccompanimentPlayStatus(scheduleId,authUser.getId(),data.getMusicScoreAccompanimentId());
|
|
|
+ courseScheduleStudentMusicScoreDao.openAccompanimentPlayStatus(scheduleId,data.getMusicScoreAccompanimentId());
|
|
|
DeviceStateChangedMessage deviceResourceMessage = new DeviceStateChangedMessage(typeEnum.ordinal(), enable);
|
|
|
deviceResourceMessage.setMusicScoreAccompanimentId(data.getMusicScoreAccompanimentId());
|
|
|
deviceResourceMessage.setUserId(userId);
|
|
@@ -988,15 +988,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
msg.setEnable(true);
|
|
|
}
|
|
|
courseScheduleStudentPaymentDao.adjustExamSong(scheduleId,authUser.getId(),JSON.toJSONString(msg));
|
|
|
- }else if (taskInfo.getTypeEnum().equals(DeviceTypeEnum.MusicScore)) {
|
|
|
- long scheduleId = Long.parseLong(roomId.substring(1));
|
|
|
- courseScheduleStudentMusicScoreDao.closePlayStatus(scheduleId,authUser.getId(),null);
|
|
|
- courseScheduleStudentMusicScoreDao.openPlayStatus(scheduleId,authUser.getId(), data.getMusicScoreAccompanimentId());
|
|
|
- }else if (taskInfo.getTypeEnum().equals(DeviceTypeEnum.MusicScoreAccompaniment)) {
|
|
|
- long scheduleId = Long.parseLong(roomId.substring(1));
|
|
|
- courseScheduleStudentMusicScoreDao.closePlayStatus(scheduleId,authUser.getId(),null);
|
|
|
- courseScheduleStudentMusicScoreDao.openAccompanimentPlayStatus(scheduleId,authUser.getId(), data.getMusicScoreAccompanimentId());
|
|
|
- } else {
|
|
|
+ }else {
|
|
|
roomMemberDao.updateMicByRidAndUid(roomId, userId, taskInfo.isOnOff());
|
|
|
}
|
|
|
ControlDeviceNotifyMessage msg = new ControlDeviceNotifyMessage(ActionEnum.Approve.ordinal());
|
|
@@ -1049,15 +1041,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
} else if (data.getExamSongOn() != null) {
|
|
|
type = DeviceTypeEnum.ExamSong;
|
|
|
enable = data.getExamSongOn();
|
|
|
- //原音
|
|
|
- } else if (data.getMusicScoreOn() != null) {
|
|
|
- type = DeviceTypeEnum.MusicScore;
|
|
|
- enable = data.getMusicScoreOn();
|
|
|
- //伴奏
|
|
|
- } else if (data.getAccompanimentOn() != null) {
|
|
|
- type = DeviceTypeEnum.MusicScoreAccompaniment;
|
|
|
- enable = data.getAccompanimentOn();
|
|
|
- } else {
|
|
|
+ }else {
|
|
|
throw new ApiException(ErrorEnum.ERR_REQUEST_PARA_ERR);
|
|
|
}
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
@@ -1081,18 +1065,6 @@ public class RoomServiceImpl implements RoomService {
|
|
|
msg.setEnable(enable);
|
|
|
}
|
|
|
courseScheduleStudentPaymentDao.adjustExamSong(scheduleId,authUser.getId(),JSON.toJSONString(msg));
|
|
|
- } else if (type.equals(DeviceTypeEnum.MusicScore)){
|
|
|
- long scheduleId = Long.parseLong(roomId.substring(1));
|
|
|
- courseScheduleStudentMusicScoreDao.closePlayStatus(scheduleId,authUser.getId(),null);
|
|
|
- if(enable){
|
|
|
- courseScheduleStudentMusicScoreDao.openPlayStatus(scheduleId,authUser.getId(),data.getMusicScoreAccompanimentId());
|
|
|
- }
|
|
|
- } else if (type.equals(DeviceTypeEnum.MusicScoreAccompaniment)){
|
|
|
- long scheduleId = Long.parseLong(roomId.substring(1));
|
|
|
- courseScheduleStudentMusicScoreDao.closePlayStatus(scheduleId,authUser.getId(),null);
|
|
|
- if(enable){
|
|
|
- courseScheduleStudentMusicScoreDao.openAccompanimentPlayStatus(scheduleId,authUser.getId(),data.getMusicScoreAccompanimentId());
|
|
|
- }
|
|
|
}else {
|
|
|
roomMemberDao.updateMusicByRidAndUid(roomId, userId, enable);
|
|
|
}
|