|
@@ -40,13 +40,14 @@
|
|
|
<result column="create_time_" property="createTime" />
|
|
|
<result column="ext_config_json_" property="extConfigJson" />
|
|
|
<result column="ext_style_config_json_" property="extStyleConfigJson" />
|
|
|
+ <result column="is_convertible_score_" property="isConvertibleScore" />
|
|
|
+ <result column="score_type_" property="scoreType"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<select id="get" resultMap="SysMusicScore" >
|
|
|
SELECT * FROM sys_music_score WHERE id_ = #{id}
|
|
|
</select>
|
|
|
-
|
|
|
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
@@ -183,7 +184,8 @@
|
|
|
update sys_music_score set music_score_categories_id_ = #{item.musicSheetCategoryId},
|
|
|
client_type_ = 'SMART_PRACTICE',type_ = 'COMMON',
|
|
|
rank_ids_ = CASE WHEN #{item.paymentType} = 'FREE' THEN NULL ELSE '1' END,
|
|
|
- order_ = #{item.sortNo},del_flag_ = 0,show_flag_ = #{item.status}
|
|
|
+ order_ = #{item.sortNo},del_flag_ = 0,show_flag_ = #{item.status},
|
|
|
+ score_type_ = #{item.scoreType},is_convertible_score_ = #{item.isConvertibleScore}
|
|
|
<if test="item.musicSheetUpdate != null">
|
|
|
,name_ = #{item.musicSheetUpdate.name},
|
|
|
subject_ids_ = #{item.musicSheetUpdate.subjectIds},
|
|
@@ -218,7 +220,8 @@
|
|
|
<insert id="batchInsert">
|
|
|
insert into sys_music_score
|
|
|
(music_score_categories_id_,client_type_,type_,rank_ids_,order_
|
|
|
- ,name_,subject_ids_,speed_,enable_evaluation_,play_mode_,show_flag_,cbs_music_sheet_id_,music_sheet_type_)
|
|
|
+ ,name_,subject_ids_,speed_,enable_evaluation_,play_mode_,show_flag_,cbs_music_sheet_id_,music_sheet_type_,
|
|
|
+ score_type_,is_convertible_score_)
|
|
|
values
|
|
|
<foreach collection="vos" item="item" separator=",">
|
|
|
(#{item.musicSheetCategoryId},
|
|
@@ -230,7 +233,8 @@
|
|
|
#{item.musicSheetUpdate.playSpeed},
|
|
|
#{item.musicSheetUpdate.canEvaluate},
|
|
|
#{item.musicSheetUpdate.playMode},0,
|
|
|
- #{item.musicSheetId},#{item.musicSheetUpdate.musicSheetType}
|
|
|
+ #{item.musicSheetId},#{item.musicSheetUpdate.musicSheetType},
|
|
|
+ #{item.scoreType},#{item.isConvertibleScore}
|
|
|
)
|
|
|
</foreach>
|
|
|
</insert>
|
|
@@ -257,11 +261,17 @@
|
|
|
<if test="showFlag != null">
|
|
|
AND ses.show_flag_ = #{showFlag}
|
|
|
</if>
|
|
|
+ <if test="isConvertibleScore != null">
|
|
|
+ AND ses.is_convertible_score_ = #{isConvertibleScore}
|
|
|
+ </if>
|
|
|
+ <if test="scoreType != null and scoreType != ''">
|
|
|
+ AND ses.score_type_ = #{scoreType}
|
|
|
+ </if>
|
|
|
<if test="subjectId != null">
|
|
|
- AND (FIND_IN_SET(#{subjectId},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '')
|
|
|
+ AND (FIND_IN_SET(#{subjectId},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '' OR ses.music_sheet_type_ = 'CONCERT')
|
|
|
</if>
|
|
|
<if test="subjectIds != null and subjectIds != ''">
|
|
|
- AND (FIND_IN_SET(#{subjectIds},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '')
|
|
|
+ AND (FIND_IN_SET(#{subjectIds},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '' OR ses.music_sheet_type_ = 'CONCERT')
|
|
|
</if>
|
|
|
<if test="clientType != null">
|
|
|
AND ses.client_type_ = #{clientType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|