|
@@ -568,7 +568,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
}
|
|
|
|
|
|
List<CourseScheduleStudentMusicScore> scheduleStudentMusicScores =
|
|
|
- courseScheduleStudentMusicScoreDao.queryByScoreIdAndCourseId(null, courseId, null, null, null);
|
|
|
+ this.initCourseScheduleStudentMusicScore(courseScheduleStudentMusicScoreDao.queryByScoreIdAndCourseId(null, courseId, null, null, null));
|
|
|
Room room = roomDao.findByRid(roomId);
|
|
|
String display = "";
|
|
|
if (roleEnum == RoleTeacher || roleEnum == RoleEnum.RoleAssistant) {
|
|
@@ -599,7 +599,6 @@ public class RoomServiceImpl implements RoomService {
|
|
|
}
|
|
|
}
|
|
|
//已下载的伴奏列表
|
|
|
- scheduleStudentMusicScores = this.initCourseScheduleStudentMusicScore(scheduleStudentMusicScores);
|
|
|
if (CollectionUtils.isNotEmpty(scheduleStudentMusicScores)) {
|
|
|
List<CourseScheduleStudentMusicScore> musicScores = scheduleStudentMusicScores.stream()
|
|
|
.filter(e -> e.getUserId().equals(sysUser.getId())).collect(Collectors.toList());
|
|
@@ -2236,12 +2235,12 @@ public class RoomServiceImpl implements RoomService {
|
|
|
// 重置房间用户信息
|
|
|
roomMemberList = Lists.newArrayList(roomMembers);
|
|
|
|
|
|
- List<CourseScheduleStudentMusicScore> scheduleStudentMusicScores = courseScheduleStudentMusicScoreDao.queryByScoreIdAndCourseId(null, Long.parseLong(roomId.substring(1)), null, null, null);
|
|
|
+ List<CourseScheduleStudentMusicScore> scheduleStudentMusicScores = this.initCourseScheduleStudentMusicScore(
|
|
|
+ courseScheduleStudentMusicScoreDao.queryByScoreIdAndCourseId(null, Long.parseLong(roomId.substring(1)), null, null, null));
|
|
|
RoomResult roomResult = new RoomResult();
|
|
|
Set<String> userIds = roomMemberList.stream().map(RoomMember::getUid).collect(Collectors.toSet());
|
|
|
Map<Integer, String> midiMap = MapUtil.convertMybatisMap(courseScheduleStudentPaymentDao.queryMidiByUserIdsAndCourseId(userIds, roomId.substring(1)));
|
|
|
Map<Integer, String> examSongMap = MapUtil.convertMybatisMap(courseScheduleStudentPaymentDao.queryExamSongByUserIdsAndCourseId(userIds, roomId.substring(1)));
|
|
|
- scheduleStudentMusicScores = this.initCourseScheduleStudentMusicScore(scheduleStudentMusicScores);
|
|
|
roomResult.setMembers(roomMemberList, midiMap, examSongMap, scheduleStudentMusicScores);
|
|
|
|
|
|
// 全员静音开启状态
|
|
@@ -2856,19 +2855,13 @@ public class RoomServiceImpl implements RoomService {
|
|
|
String roomId = musicScoreData.getRoomId();
|
|
|
Long scheduleId = Long.parseLong(roomId.substring(1));
|
|
|
String accompanimentId = musicScoreData.getMusicScoreAccompanimentId();
|
|
|
- List<CourseScheduleStudentMusicScore> studentMusicScores = courseScheduleStudentMusicScoreDao.queryByScoreIdAndCourseId(accompanimentId, scheduleId, studentId, null, null);
|
|
|
+ List<CourseScheduleStudentMusicScore> studentMusicScores = this.initCourseScheduleStudentMusicScore(
|
|
|
+ courseScheduleStudentMusicScoreDao.queryByScoreIdAndCourseId(accompanimentId, scheduleId, studentId, null, null));
|
|
|
if (accompanimentId != null) {
|
|
|
//修改下载状态
|
|
|
if (CollectionUtils.isEmpty(studentMusicScores)) {
|
|
|
throw new BizException("学员不存在此下载曲目");
|
|
|
}
|
|
|
- CbsMusicSheetWrapper.MusicSheetAccApplication sheetApplication = this.getSheetApplication(accompanimentId);
|
|
|
- for (CourseScheduleStudentMusicScore studentMusicScore : studentMusicScores) {
|
|
|
- studentMusicScore.setMusicScoreName(sheetApplication.getName());
|
|
|
- studentMusicScore.setMp3Url(sheetApplication.getMp3Url());
|
|
|
- studentMusicScore.setUrl(sheetApplication.getUrl());
|
|
|
- courseScheduleStudentMusicScoreDao.update(studentMusicScore);
|
|
|
- }
|
|
|
CourseScheduleStudentMusicScore studentMusicScore = studentMusicScores.get(0);
|
|
|
studentMusicScore.setDownStatus(musicScoreData.getStatus());
|
|
|
courseScheduleStudentMusicScoreDao.update(studentMusicScore);
|