zouxuan 3 năm trước cách đây
mục cha
commit
fed0c1970b

+ 0 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentMusicScoreDao.java

@@ -8,8 +8,6 @@ import java.util.List;
 
 public interface CourseScheduleStudentMusicScoreDao extends BaseDAO<Integer, CourseScheduleStudentMusicScore> {
 
-    int updateByMusicScore(CourseScheduleStudentMusicScore courseScheduleStudentMusicScore);
-
     List<CourseScheduleStudentMusicScore> queryByScoreIdAndCourseId(@Param("musicScoreAccompanimentId") Integer musicScoreAccompanimentId,
                                                                     @Param("courseId") Long courseId,
                                                                     @Param("userId") Integer userId,

+ 0 - 12
mec-biz/src/main/resources/config/mybatis/courseScheduleStudentMusicScoreMapper.xml

@@ -67,18 +67,6 @@
         </set>
         WHERE id_ = #{id}
     </update>
-
-    <update id="updateByMusicScore" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleStudentMusicScore">
-        UPDATE course_schedule_student_music_score
-        SET down_status_ = #{downStatus},play_status_ = #{playStatus},speed_ = #{speed},update_time_ = NOW()
-        WHERE course_schedule_id_ = #{courseScheduleId}
-        <if test="userId != null">
-            AND user_id_ = #{userId}
-        </if>
-        <if test="musicScoreAccompanimentId != null">
-            AND music_score_accompaniment_id_ = #{musicScoreAccompanimentId}
-        </if>
-    </update>
     <update id="closePlayStatus">
         UPDATE course_schedule_student_music_score SET play_status_ = 0,accompaniment_play_status_ = 0,update_time_ = NOW()
         WHERE course_schedule_id_ = #{scheduleId}

+ 3 - 3
mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java

@@ -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));