|
@@ -183,13 +183,12 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
<select id="queryAccPage" resultMap="SysMusicScoreAccompaniment">
|
|
|
- SELECT sesa.*,ses.name_,ses.type_,ses.url_,s.name_ subject_name_,sesc.name_ categories_name_,sesc.id_ categories_id_,sesc.parent_id_ parent_categories_id_,ses.client_type_,
|
|
|
+ SELECT sesa.*,ses.name_,ses.type_,ses.url_,sesc.name_ categories_name_,sesc.id_ categories_id_,sesc.parent_id_ parent_categories_id_,ses.client_type_,
|
|
|
ses.enable_evaluation_,ses.metronome_url_,ses.midi_url_,ses.play_mode_,ses.render_from_,ses.ext_config_json_,
|
|
|
ses.ext_style_config_json_,ses.rank_ids_,ses.cbs_music_sheet_id_
|
|
|
FROM sys_music_score ses
|
|
|
LEFT JOIN sys_music_score_accompaniment sesa ON ses.id_ = sesa.exam_song_id_
|
|
|
LEFT JOIN sys_music_score_categories sesc ON sesc.id_ = ses.music_score_categories_id_
|
|
|
- LEFT JOIN subject s ON s.id_ = sesa.subject_id_
|
|
|
<include refid="queryPageSql"/>
|
|
|
ORDER BY ses.order_,ses.name_
|
|
|
</select>
|
|
@@ -202,18 +201,17 @@
|
|
|
<include refid="queryPageSql"/>
|
|
|
</select>
|
|
|
<select id="querySubjectIds" resultMap="com.ym.mec.biz.dal.dao.SubjectDao.Subject">
|
|
|
- SELECT s.* FROM sys_music_score_accompaniment sesa
|
|
|
- LEFT JOIN `subject` s ON s.id_ = sesa.subject_id_
|
|
|
- LEFT JOIN sys_music_score sms ON sms.id_ = sesa.exam_song_id_
|
|
|
+ SELECT s.* FROM sys_music_score sms
|
|
|
+ LEFT JOIN `subject` s ON FIND_IN_SET(s.id_,sms.subject_ids_)
|
|
|
LEFT JOIN sys_music_score_categories sesc ON sesc.id_ = sms.music_score_categories_id_
|
|
|
- WHERE sesa.del_flag_ = 0 AND sesa.subject_id_ IS NOT NULL
|
|
|
+ WHERE sms.del_flag_ = 0 AND s.id_ IS NOT NULL
|
|
|
<if test="categoriesIdList != null and categoriesIdList.size > 0">
|
|
|
AND sesc.id_ IN
|
|
|
<foreach collection="categoriesIdList" separator="," item="item" open="(" close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- GROUP BY sesa.subject_id_
|
|
|
+ GROUP BY s.id_
|
|
|
</select>
|
|
|
<select id="findByMusicScoreId" resultMap="SysMusicScoreAccompaniment">
|
|
|
SELECT * FROM sys_music_score_accompaniment WHERE exam_song_id_ = #{recordId} AND del_flag_ = 0
|
|
@@ -232,7 +230,7 @@
|
|
|
AND INTE_ARRAY(#{organId},sesc.organ_id_)
|
|
|
</if> -->
|
|
|
<if test="search != null and search != ''">
|
|
|
- AND (sesa.id_ = #{search} OR ses.name_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ AND (ses.id_ = #{search} OR ses.name_ LIKE CONCAT('%',#{search},'%'))
|
|
|
</if>
|
|
|
<if test="sysMusicScoreId != null">
|
|
|
AND sesa.exam_song_id_ = #{sysMusicScoreId}
|
|
@@ -256,10 +254,7 @@
|
|
|
AND sesc.parent_id_ = #{parentId}
|
|
|
</if>
|
|
|
<if test="subjectId != null">
|
|
|
- AND (sesa.subject_id_ = #{subjectId} OR sesa.subject_id_ IS NULL)
|
|
|
- </if>
|
|
|
- <if test="isShowFingering != null">
|
|
|
- AND sesa.is_show_fingering_ = #{isShowFingering}
|
|
|
+ AND (FIND_IN_SET(#{subjectId},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '')
|
|
|
</if>
|
|
|
<if test="clientType != null">
|
|
|
AND ses.client_type_ = #{clientType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|