|
@@ -42,10 +42,6 @@
|
|
|
<result column="rank_ids_" property="rankIds" />
|
|
|
</resultMap>
|
|
|
|
|
|
- <delete id="deleteBySongId">
|
|
|
- UPDATE sys_music_score_accompaniment SET del_flag_ = 1,update_time_ = NOW() WHERE exam_song_id_ = #{id}
|
|
|
- </delete>
|
|
|
-
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<select id="get" resultMap="SysMusicScoreAccompaniment" >
|
|
|
SELECT sesa.id_,sesa.exam_song_id_,sesa.subject_id_,CASE WHEN sesa.metronome_mp3_url_ IS NULL OR sesa.metronome_mp3_url_ = '' THEN sesa.mp3_url_ ELSE sesa.metronome_mp3_url_ END url_,sesa.speed_,
|
|
@@ -67,15 +63,6 @@
|
|
|
INSERT INTO sys_music_score_accompaniment (exam_song_id_,subject_id_,mp3_url_,metronome_mp3_url_,speed_,xml_url_,create_time_,update_time_,is_open_metronome_,track_)
|
|
|
VALUES(#{examSongId},#{subjectId},#{mp3Url},#{metronomeMp3Url},#{speed},#{xmlUrl},NOW(),NOW(),#{isOpenMetronome},#{track})
|
|
|
</insert>
|
|
|
- <insert id="batchInsert">
|
|
|
- INSERT INTO sys_music_score_accompaniment (exam_song_id_,subject_id_,mp3_url_,metronome_mp3_url_,speed_,xml_url_,
|
|
|
- create_time_,update_time_,is_show_fingering_,memo_,is_open_metronome_,track_)
|
|
|
- VALUES
|
|
|
- <foreach collection="sysMusicScoreAccompaniments" item="item" separator=",">
|
|
|
- (#{sysMusicScoreId},#{item.subjectId},#{item.mp3Url},#{item.metronomeMp3Url},#{item.speed},
|
|
|
- #{item.xmlUrl},NOW(),NOW(),#{item.isShowFingering},#{item.memo},#{item.isOpenMetronome},#{item.track})
|
|
|
- </foreach>
|
|
|
- </insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.SysMusicScoreAccompaniment">
|
|
@@ -103,39 +90,6 @@
|
|
|
mp3_url_ = #{mp3Url},metronome_mp3_url_ = #{metronomeMp3Url}, update_time_ = NOW()
|
|
|
</set>WHERE id_ = #{id}
|
|
|
</update>
|
|
|
- <update id="batchDel">
|
|
|
- UPDATE sys_music_score_accompaniment SET del_flag_ = 1,update_time_ = NOW() WHERE id_ IN
|
|
|
- <foreach collection="delExamSongAccompanimentIds" item="item" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </update>
|
|
|
- <update id="batchUpdate">
|
|
|
- <foreach collection="sysMusicScoreAccompaniments" item="item" separator=";">
|
|
|
- UPDATE sys_music_score_accompaniment
|
|
|
- <set>
|
|
|
- <if test="item.isShowFingering != null">
|
|
|
- is_show_fingering_ = #{item.isShowFingering},
|
|
|
- </if>
|
|
|
- <if test="isOpenMetronome != null">
|
|
|
- is_open_metronome_ = #{isOpenMetronome},
|
|
|
- </if>
|
|
|
- <if test="item.memo != null">
|
|
|
- memo_ = #{item.memo},
|
|
|
- </if>
|
|
|
- <if test="item.speed != null">
|
|
|
- speed_ = #{item.speed},
|
|
|
- </if>
|
|
|
- <if test="item.examSongId != null">
|
|
|
- exam_song_id_ = #{item.examSongId},
|
|
|
- </if>
|
|
|
- <if test="item.track != null">
|
|
|
- track_ = #{item.track},
|
|
|
- </if>
|
|
|
- subject_id_ = #{item.subjectId},xml_url_ = #{item.xmlUrl},metronome_mp3_url_ = #{item.metronomeMp3Url},
|
|
|
- mp3_url_ = #{item.mp3Url}, update_time_ = NOW()
|
|
|
- </set> WHERE id_ = #{item.id}
|
|
|
- </foreach>
|
|
|
- </update>
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
|
<update id="delete" >
|