|
@@ -0,0 +1,295 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<!--
|
|
|
+这个文件是自动生成的。
|
|
|
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
|
|
|
+-->
|
|
|
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.MusicSheetDao">
|
|
|
+
|
|
|
+ <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="composer_" property="composer" />
|
|
|
+ <result column="music_instrument_" property="musicInstrument" />
|
|
|
+ <result column="audio_type_" property="audioType" />
|
|
|
+ <result column="music_tag_" property="musicTag" />
|
|
|
+ <result column="play_speed_" property="playSpeed" />
|
|
|
+ <result column="can_evaluate_" property="canEvaluate" />
|
|
|
+ <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="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="create_time_" property="createTime" />
|
|
|
+ <result column="create_user_" property="createUser" />
|
|
|
+ <result column="update_time_" property="updateTime" />
|
|
|
+ <result column="update_user_" property="updateUser" />
|
|
|
+ <result column="remark_" property="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <select id="get" resultMap="BaseResultMap" >
|
|
|
+ SELECT * FROM music_sheet WHERE id_ = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 全查询 -->
|
|
|
+ <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>
|
|
|
+ <if test="musicSource != null and musicSource != ''">
|
|
|
+ and music_source_ = #{musicSource}
|
|
|
+ </if>
|
|
|
+ <if test="composer != null and composer != ''">
|
|
|
+ and composer_ = #{composer}
|
|
|
+ </if>
|
|
|
+ <if test="musicInstrument != null and musicInstrument != ''">
|
|
|
+ and music_instrument_ = #{musicInstrument}
|
|
|
+ </if>
|
|
|
+ <if test="audioType != null and audioType != ''">
|
|
|
+ and audio_type_ = #{audioType}
|
|
|
+ </if>
|
|
|
+ <if test="musicTag != null and musicTag != ''">
|
|
|
+ and music_tag_ = #{musicTag}
|
|
|
+ </if>
|
|
|
+ <if test="playSpeed != null and playSpeed != ''">
|
|
|
+ and play_speed_ = #{playSpeed}
|
|
|
+ </if>
|
|
|
+ <if test="canEvaluate != null and canEvaluate != ''">
|
|
|
+ and can_evaluate_ = #{canEvaluate}
|
|
|
+ </if>
|
|
|
+ <if test="showFingering != null and showFingering != ''">
|
|
|
+ and show_fingering_ = #{showFingering}
|
|
|
+ </if>
|
|
|
+ <if test="chargeType != null and chargeType != ''">
|
|
|
+ and charge_type_ = #{chargeType}
|
|
|
+ </if>
|
|
|
+ <if test="auditStatus != null and auditStatus != ''">
|
|
|
+ and audit_status_ = #{auditStatus}
|
|
|
+ </if>
|
|
|
+ <if test="orderNo != null and orderNo != ''">
|
|
|
+ and order_no_ = #{orderNo}
|
|
|
+ </if>
|
|
|
+ <if test="topFlag != null and topFlag != ''">
|
|
|
+ and top_flag_ = #{topFlag}
|
|
|
+ </if>
|
|
|
+ <if test="hotFlag != null and hotFlag != ''">
|
|
|
+ and hot_flag_ = #{hotFlag}
|
|
|
+ </if>
|
|
|
+ <if test="musicPrice != null and musicPrice != ''">
|
|
|
+ and music_price_ = #{musicPrice}
|
|
|
+ </if>
|
|
|
+ <if test="audioFileUrl != null and audioFileUrl != ''">
|
|
|
+ and audio_file_url_ = #{audioFileUrl}
|
|
|
+ </if>
|
|
|
+ <if test="xmlFileUrl != null and xmlFileUrl != ''">
|
|
|
+ and xml_file_url_ = #{xmlFileUrl}
|
|
|
+ </if>
|
|
|
+ <if test="mp3HasBeat != null and mp3HasBeat != ''">
|
|
|
+ and mp3_has_beat_ = #{mp3HasBeat}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null and createTime != ''">
|
|
|
+ and create_time_ = #{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="createUser != null and createUser != ''">
|
|
|
+ and create_user_ = #{createUser}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null and updateTime != ''">
|
|
|
+ and update_time_ = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUser != null and updateUser != ''">
|
|
|
+ and update_user_ = #{updateUser}
|
|
|
+ </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>
|
|
|
+
|
|
|
+ <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>
|
|
|
+ <if test="musicSource != null">
|
|
|
+ and music_source_ = #{musicSource}
|
|
|
+ </if>
|
|
|
+ <if test="composer != null and composer != ''">
|
|
|
+ and composer_ = #{composer}
|
|
|
+ </if>
|
|
|
+ <if test="musicInstrument != null and musicInstrument != ''">
|
|
|
+ and music_instrument_ = #{musicInstrument}
|
|
|
+ </if>
|
|
|
+ <if test="audioType != null and audioType != ''">
|
|
|
+ and audio_type_ = #{audioType}
|
|
|
+ </if>
|
|
|
+ <if test="musicTag != null and musicTag != ''">
|
|
|
+ and music_tag_ = #{musicTag}
|
|
|
+ </if>
|
|
|
+ <if test="playSpeed != null">
|
|
|
+ and play_speed_ = #{playSpeed}
|
|
|
+ </if>
|
|
|
+ <if test="canEvaluate != null">
|
|
|
+ and can_evaluate_ = #{canEvaluate}
|
|
|
+ </if>
|
|
|
+ <if test="showFingering != null">
|
|
|
+ and show_fingering_ = #{showFingering}
|
|
|
+ </if>
|
|
|
+ <if test="chargeType != null">
|
|
|
+ and charge_type_ = #{chargeType}
|
|
|
+ </if>
|
|
|
+ <if test="auditStatus != null">
|
|
|
+ and audit_status_ = #{auditStatus}
|
|
|
+ </if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ and order_no_ = #{orderNo}
|
|
|
+ </if>
|
|
|
+ <if test="topFlag != null">
|
|
|
+ and top_flag_ = #{topFlag}
|
|
|
+ </if>
|
|
|
+ <if test="hotFlag != null">
|
|
|
+ and hot_flag_ = #{hotFlag}
|
|
|
+ </if>
|
|
|
+ <if test="musicPrice != null">
|
|
|
+ and music_price_ = #{musicPrice}
|
|
|
+ </if>
|
|
|
+ <if test="audioFileUrl != null and audioFileUrl != ''">
|
|
|
+ and audio_file_url_ = #{audioFileUrl}
|
|
|
+ </if>
|
|
|
+ <if test="xmlFileUrl != null and xmlFileUrl != ''">
|
|
|
+ and xml_file_url_ = #{xmlFileUrl}
|
|
|
+ </if>
|
|
|
+ <if test="mp3HasBeat != null">
|
|
|
+ and mp3_has_beat_ = #{mp3HasBeat}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and create_time_ = #{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="createUser != null">
|
|
|
+ and create_user_ = #{createUser}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and update_time_ = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUser != null">
|
|
|
+ and update_user_ = #{updateUser}
|
|
|
+ </if>
|
|
|
+ <if test="remark != null and remark != ''">
|
|
|
+ and remark_ = #{remark}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+</mapper>
|