|
@@ -8,10 +8,10 @@
|
|
|
|
|
|
<resultMap type="com.yonge.cooleshow.biz.dal.entity.MusicSheet" id="BaseResultMap">
|
|
|
<result column="id_" property="id" />
|
|
|
- <result column="music_name_" property="musicName" />
|
|
|
- <result column="music_source_" property="musicSource" />
|
|
|
+ <result column="music_sheet_name_" property="musicSheetName" />
|
|
|
+ <result column="user_id_" property="userId" />
|
|
|
<result column="composer_" property="composer" />
|
|
|
- <result column="music_instrument_" property="musicInstrument" />
|
|
|
+ <result column="music_subject_" property="musicSubject" />
|
|
|
<result column="audio_type_" property="audioType" />
|
|
|
<result column="music_tag_" property="musicTag" />
|
|
|
<result column="play_speed_" property="playSpeed" />
|
|
@@ -19,17 +19,17 @@
|
|
|
<result column="show_fingering_" property="showFingering" />
|
|
|
<result column="charge_type_" property="chargeType" />
|
|
|
<result column="audit_status_" property="auditStatus" />
|
|
|
- <result column="order_no_" property="orderNo" />
|
|
|
+ <result column="sort_number_" property="sortNumber" />
|
|
|
<result column="top_flag_" property="topFlag" />
|
|
|
<result column="hot_flag_" property="hotFlag" />
|
|
|
<result column="music_price_" property="musicPrice" />
|
|
|
<result column="audio_file_url_" property="audioFileUrl" />
|
|
|
<result column="xml_file_url_" property="xmlFileUrl" />
|
|
|
- <result column="mp3_has_beat_" property="mp3HasBeat" />
|
|
|
+ <result column="has_beat_" property="hasBeat" />
|
|
|
<result column="create_time_" property="createTime" />
|
|
|
- <result column="create_user_" property="createUser" />
|
|
|
+ <result column="create_by_" property="createBy" />
|
|
|
<result column="update_time_" property="updateTime" />
|
|
|
- <result column="update_user_" property="updateUser" />
|
|
|
+ <result column="update_by_" property="updateBy" />
|
|
|
<result column="remark_" property="remark" />
|
|
|
</resultMap>
|
|
|
|
|
@@ -42,111 +42,21 @@
|
|
|
<select id="findAll" resultMap="BaseResultMap">
|
|
|
SELECT * FROM music_sheet ORDER BY id_
|
|
|
</select>
|
|
|
-
|
|
|
- <!-- 向数据库增加一条记录 -->
|
|
|
- <insert id="insert" parameterType="com.yonge.cooleshow.biz.dal.entity.MusicSheet" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
- insert into music_sheet
|
|
|
- (music_name_,music_source_,composer_,music_instrument_,audio_type_,music_tag_,play_speed_,can_evaluate_,show_fingering_,charge_type_,audit_status_,order_no_,top_flag_,hot_flag_,music_price_,audio_file_url_,xml_file_url_,mp3_has_beat_,create_time_,create_user_,update_time_,update_user_,remark_)
|
|
|
- values
|
|
|
- (#{musicName},#{musicSource},#{composer},#{musicInstrument},#{audioType},#{musicTag},#{playSpeed},#{canEvaluate},#{showFingering},#{chargeType},#{auditStatus},#{orderNo},#{topFlag},#{hotFlag},#{musicPrice},#{audioFileUrl},#{xmlFileUrl},#{mp3HasBeat},sysdate(),#{createUser},#{updateTime},#{updateUser},#{remark})
|
|
|
- </insert>
|
|
|
-
|
|
|
- <!-- 根据主键查询一条记录 -->
|
|
|
- <update id="update" parameterType="com.yonge.cooleshow.biz.dal.entity.MusicSheet">
|
|
|
- UPDATE music_sheet
|
|
|
- <set>
|
|
|
- <if test="musicName != null and musicName != ''">
|
|
|
- music_name_ = #{musicName},
|
|
|
- </if>
|
|
|
- <if test="musicSource != null">
|
|
|
- music_source_ = #{musicSource},
|
|
|
- </if>
|
|
|
- <if test="composer != null and composer != ''">
|
|
|
- composer_ = #{composer},
|
|
|
- </if>
|
|
|
- <if test="musicInstrument != null and musicInstrument != ''">
|
|
|
- music_instrument_ = #{musicInstrument},
|
|
|
- </if>
|
|
|
- <if test="audioType != null and audioType != ''">
|
|
|
- audio_type_ = #{audioType},
|
|
|
- </if>
|
|
|
- <if test="musicTag != null and musicTag != ''">
|
|
|
- music_tag_ = #{musicTag},
|
|
|
- </if>
|
|
|
- <if test="playSpeed != null">
|
|
|
- play_speed_ = #{playSpeed},
|
|
|
- </if>
|
|
|
- <if test="canEvaluate != null">
|
|
|
- can_evaluate_ = #{canEvaluate},
|
|
|
- </if>
|
|
|
- <if test="showFingering != null">
|
|
|
- show_fingering_ = #{showFingering},
|
|
|
- </if>
|
|
|
- <if test="chargeType != null">
|
|
|
- charge_type_ = #{chargeType},
|
|
|
- </if>
|
|
|
- <if test="auditStatus != null">
|
|
|
- audit_status_ = #{auditStatus},
|
|
|
- </if>
|
|
|
- <if test="orderNo != null">
|
|
|
- order_no_ = #{orderNo},
|
|
|
- </if>
|
|
|
- <if test="topFlag != null">
|
|
|
- top_flag_ = #{topFlag},
|
|
|
- </if>
|
|
|
- <if test="hotFlag != null">
|
|
|
- hot_flag_ = #{hotFlag},
|
|
|
- </if>
|
|
|
- <if test="musicPrice != null">
|
|
|
- music_price_ = #{musicPrice},
|
|
|
- </if>
|
|
|
- <if test="audioFileUrl != null and audioFileUrl != ''">
|
|
|
- audio_file_url_ = #{audioFileUrl},
|
|
|
- </if>
|
|
|
- <if test="xmlFileUrl != null and xmlFileUrl != ''">
|
|
|
- xml_file_url_ = #{xmlFileUrl},
|
|
|
- </if>
|
|
|
- <if test="mp3HasBeat != null">
|
|
|
- mp3_has_beat_ = #{mp3HasBeat},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time_ = #{createTime},
|
|
|
- </if>
|
|
|
- <if test="createUser != null">
|
|
|
- create_user_ = #{createUser},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">
|
|
|
- update_time_ = #{updateTime},
|
|
|
- </if>
|
|
|
- <if test="updateUser != null">
|
|
|
- update_user_ = #{updateUser},
|
|
|
- </if>
|
|
|
- <if test="remark != null and remark != ''">
|
|
|
- remark_ = #{remark},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- WHERE id_ = #{id}
|
|
|
- </update>
|
|
|
-
|
|
|
- <!-- 根据主键删除一条记录 -->
|
|
|
- <delete id="delete" >
|
|
|
- DELETE FROM music_sheet WHERE id_ = #{id}
|
|
|
- </delete>
|
|
|
|
|
|
<delete id="delete" parameterType="MusicSheet">
|
|
|
delete from music_sheet
|
|
|
where 1=1
|
|
|
- <if test="musicName != null and musicName != ''">
|
|
|
- and music_name_ = #{musicName}
|
|
|
+ <if test="musicSheetName != null and musicSheetName != ''">
|
|
|
+ and music_sheet_name_ = #{musicSheetName}
|
|
|
</if>
|
|
|
- <if test="musicSource != null and musicSource != ''">
|
|
|
- and music_source_ = #{musicSource}
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ and user_id_ = #{userId}
|
|
|
</if>
|
|
|
<if test="composer != null and composer != ''">
|
|
|
and composer_ = #{composer}
|
|
|
</if>
|
|
|
- <if test="musicInstrument != null and musicInstrument != ''">
|
|
|
- and music_instrument_ = #{musicInstrument}
|
|
|
+ <if test="musicSubject != null and musicSubject != ''">
|
|
|
+ and music_subject_ = #{musicSubject}
|
|
|
</if>
|
|
|
<if test="audioType != null and audioType != ''">
|
|
|
and audio_type_ = #{audioType}
|
|
@@ -169,8 +79,8 @@
|
|
|
<if test="auditStatus != null and auditStatus != ''">
|
|
|
and audit_status_ = #{auditStatus}
|
|
|
</if>
|
|
|
- <if test="orderNo != null and orderNo != ''">
|
|
|
- and order_no_ = #{orderNo}
|
|
|
+ <if test="sortNumber != null and sortNumber != ''">
|
|
|
+ and sort_number_ = #{sortNumber}
|
|
|
</if>
|
|
|
<if test="topFlag != null and topFlag != ''">
|
|
|
and top_flag_ = #{topFlag}
|
|
@@ -187,52 +97,125 @@
|
|
|
<if test="xmlFileUrl != null and xmlFileUrl != ''">
|
|
|
and xml_file_url_ = #{xmlFileUrl}
|
|
|
</if>
|
|
|
- <if test="mp3HasBeat != null and mp3HasBeat != ''">
|
|
|
- and mp3_has_beat_ = #{mp3HasBeat}
|
|
|
+ <if test="hasBeat != null and hasBeat != ''">
|
|
|
+ and has_beat_ = #{hasBeat}
|
|
|
</if>
|
|
|
<if test="createTime != null and createTime != ''">
|
|
|
and create_time_ = #{createTime}
|
|
|
</if>
|
|
|
- <if test="createUser != null and createUser != ''">
|
|
|
- and create_user_ = #{createUser}
|
|
|
+ <if test="createBy != null and createBy != ''">
|
|
|
+ and create_by_ = #{createBy}
|
|
|
</if>
|
|
|
<if test="updateTime != null and updateTime != ''">
|
|
|
and update_time_ = #{updateTime}
|
|
|
</if>
|
|
|
- <if test="updateUser != null and updateUser != ''">
|
|
|
- and update_user_ = #{updateUser}
|
|
|
+ <if test="updateBy != null and updateBy != ''">
|
|
|
+ and update_by_ = #{updateBy}
|
|
|
</if>
|
|
|
<if test="remark != null and remark != ''">
|
|
|
and remark_ = #{remark}
|
|
|
</if>
|
|
|
</delete>
|
|
|
-
|
|
|
- <!-- 分页查询 -->
|
|
|
- <select id="queryPage" resultMap="BaseResultMap" parameterType="map">
|
|
|
- SELECT * FROM music_sheet ORDER BY id_ <include refid="global.limit"/>
|
|
|
- </select>
|
|
|
-
|
|
|
- <!-- 查询当前表的总记录数 -->
|
|
|
- <select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*) FROM music_sheet
|
|
|
- </select>
|
|
|
+
|
|
|
+ <insert id="insert" parameterType="MusicSheet">
|
|
|
+ insert into music_sheet
|
|
|
+ (music_sheet_name_,user_id_,composer_,music_subject_,audio_type_,music_tag_,play_speed_,can_evaluate_,show_fingering_,charge_type_,audit_status_,sort_number_,top_flag_,hot_flag_,music_price_,audio_file_url_,xml_file_url_,has_beat_,create_time_,create_by_,update_time_,update_by_,remark_)
|
|
|
+ values
|
|
|
+ (#{musicSheetName},#{userId},#{composer},#{musicSubject},#{audioType},#{musicTag},#{playSpeed},#{canEvaluate},#{showFingering},#{chargeType},#{auditStatus},#{sortNumber},#{topFlag},#{hotFlag},#{musicPrice},#{audioFileUrl},#{xmlFileUrl},#{hasBeat},sysdate(),#{createBy},#{updateTime},#{updateBy},#{remark})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="update" parameterType="MusicSheet">
|
|
|
+ update music_sheet
|
|
|
+ <set>
|
|
|
+ <if test="musicSheetName != null and musicSheetName != ''">
|
|
|
+ music_sheet_name_ = #{musicSheetName},
|
|
|
+ </if>
|
|
|
+ <if test="userId != null">
|
|
|
+ user_id_ = #{userId},
|
|
|
+ </if>
|
|
|
+ <if test="composer != null and composer != ''">
|
|
|
+ composer_ = #{composer},
|
|
|
+ </if>
|
|
|
+ <if test="musicSubject != null and musicSubject != ''">
|
|
|
+ music_subject_ = #{musicSubject},
|
|
|
+ </if>
|
|
|
+ <if test="audioType != null and audioType != ''">
|
|
|
+ audio_type_ = #{audioType},
|
|
|
+ </if>
|
|
|
+ <if test="musicTag != null and musicTag != ''">
|
|
|
+ music_tag_ = #{musicTag},
|
|
|
+ </if>
|
|
|
+ <if test="playSpeed != null">
|
|
|
+ play_speed_ = #{playSpeed},
|
|
|
+ </if>
|
|
|
+ <if test="canEvaluate != null">
|
|
|
+ can_evaluate_ = #{canEvaluate},
|
|
|
+ </if>
|
|
|
+ <if test="showFingering != null">
|
|
|
+ show_fingering_ = #{showFingering},
|
|
|
+ </if>
|
|
|
+ <if test="chargeType != null">
|
|
|
+ charge_type_ = #{chargeType},
|
|
|
+ </if>
|
|
|
+ <if test="auditStatus != null">
|
|
|
+ audit_status_ = #{auditStatus},
|
|
|
+ </if>
|
|
|
+ <if test="sortNumber != null">
|
|
|
+ sort_number_ = #{sortNumber},
|
|
|
+ </if>
|
|
|
+ <if test="topFlag != null">
|
|
|
+ top_flag_ = #{topFlag},
|
|
|
+ </if>
|
|
|
+ <if test="hotFlag != null">
|
|
|
+ hot_flag_ = #{hotFlag},
|
|
|
+ </if>
|
|
|
+ <if test="musicPrice != null">
|
|
|
+ music_price_ = #{musicPrice},
|
|
|
+ </if>
|
|
|
+ <if test="audioFileUrl != null and audioFileUrl != ''">
|
|
|
+ audio_file_url_ = #{audioFileUrl},
|
|
|
+ </if>
|
|
|
+ <if test="xmlFileUrl != null and xmlFileUrl != ''">
|
|
|
+ xml_file_url_ = #{xmlFileUrl},
|
|
|
+ </if>
|
|
|
+ <if test="hasBeat != null">
|
|
|
+ has_beat_ = #{hasBeat},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time_ = #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">
|
|
|
+ create_by_ = #{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time_ = #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">
|
|
|
+ update_by_ = #{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ remark_ = #{remark},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
|
|
|
<select id="findList" parameterType="MusicSheet" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from music_sheet
|
|
|
where 1=1
|
|
|
- <if test="musicName != null and musicName != ''">
|
|
|
- and music_name_ = #{musicName}
|
|
|
+ <if test="musicSheetName != null and musicSheetName != ''">
|
|
|
+ and music_sheet_name_ = #{musicSheetName}
|
|
|
</if>
|
|
|
- <if test="musicSource != null">
|
|
|
- and music_source_ = #{musicSource}
|
|
|
+ <if test="userId != null">
|
|
|
+ and user_id_ = #{userId}
|
|
|
</if>
|
|
|
<if test="composer != null and composer != ''">
|
|
|
and composer_ = #{composer}
|
|
|
</if>
|
|
|
- <if test="musicInstrument != null and musicInstrument != ''">
|
|
|
- and music_instrument_ = #{musicInstrument}
|
|
|
+ <if test="musicSubject != null and musicSubject != ''">
|
|
|
+ and music_subject_ = #{musicSubject}
|
|
|
</if>
|
|
|
<if test="audioType != null and audioType != ''">
|
|
|
and audio_type_ = #{audioType}
|
|
@@ -255,8 +238,8 @@
|
|
|
<if test="auditStatus != null">
|
|
|
and audit_status_ = #{auditStatus}
|
|
|
</if>
|
|
|
- <if test="orderNo != null">
|
|
|
- and order_no_ = #{orderNo}
|
|
|
+ <if test="sortNumber != null">
|
|
|
+ and sort_number_ = #{sortNumber}
|
|
|
</if>
|
|
|
<if test="topFlag != null">
|
|
|
and top_flag_ = #{topFlag}
|
|
@@ -273,23 +256,38 @@
|
|
|
<if test="xmlFileUrl != null and xmlFileUrl != ''">
|
|
|
and xml_file_url_ = #{xmlFileUrl}
|
|
|
</if>
|
|
|
- <if test="mp3HasBeat != null">
|
|
|
- and mp3_has_beat_ = #{mp3HasBeat}
|
|
|
+ <if test="hasBeat != null">
|
|
|
+ and has_beat_ = #{hasBeat}
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
and create_time_ = #{createTime}
|
|
|
</if>
|
|
|
- <if test="createUser != null">
|
|
|
- and create_user_ = #{createUser}
|
|
|
+ <if test="createBy != null">
|
|
|
+ and create_by_ = #{createBy}
|
|
|
</if>
|
|
|
<if test="updateTime != null">
|
|
|
and update_time_ = #{updateTime}
|
|
|
</if>
|
|
|
- <if test="updateUser != null">
|
|
|
- and update_user_ = #{updateUser}
|
|
|
+ <if test="updateBy != null">
|
|
|
+ and update_by_ = #{updateBy}
|
|
|
</if>
|
|
|
<if test="remark != null and remark != ''">
|
|
|
and remark_ = #{remark}
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <!-- 根据主键删除一条记录 -->
|
|
|
+ <delete id="delete" >
|
|
|
+ DELETE FROM music_sheet WHERE id_ = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="queryPage" resultMap="BaseResultMap" parameterType="map">
|
|
|
+ SELECT * FROM music_sheet ORDER BY id_ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询当前表的总记录数 -->
|
|
|
+ <select id="queryCount" resultType="int">
|
|
|
+ SELECT COUNT(*) FROM music_sheet
|
|
|
+ </select>
|
|
|
</mapper>
|