123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <?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.MusicSheetAccompanimentDao">
-
- <resultMap type="com.yonge.cooleshow.biz.dal.entity.MusicSheetAccompaniment" id="BaseResultMap">
- <result column="id_" property="id" />
- <result column="music_sheet_id_" property="musicSheetId" />
- <result column="music_subject_" property="musicSubject" />
- <result column="audio_file_url_" property="audioFileUrl" />
- <result column="sort_number_" property="sortNumber" />
- <result column="create_time_" property="createTime" />
- <result column="create_by_" property="createBy" />
- </resultMap>
-
-
- <select id="get" resultMap="BaseResultMap" >
- SELECT * FROM music_sheet_accompaniment WHERE id_ = #{id}
- </select>
-
-
- <select id="findAll" resultMap="BaseResultMap">
- SELECT * FROM music_sheet_accompaniment ORDER BY id_
- </select>
- <delete id="delete" parameterType="MusicSheetAccompaniment">
- delete from music_sheet_accompaniment
- where 1=1
- <if test="musicSheetId != null and musicSheetId != ''">
- and music_sheet_id_ = #{musicSheetId}
- </if>
- <if test="musicSubject != null and musicSubject != ''">
- and music_subject_ = #{musicSubject}
- </if>
- <if test="audioFileUrl != null and audioFileUrl != ''">
- and audio_file_url_ = #{audioFileUrl}
- </if>
- <if test="sortNumber != null and sortNumber != ''">
- and sort_number_ = #{sortNumber}
- </if>
- <if test="createTime != null and createTime != ''">
- and create_time_ = #{createTime}
- </if>
- <if test="createBy != null and createBy != ''">
- and create_by_ = #{createBy}
- </if>
- </delete>
- <insert id="insert" parameterType="MusicSheetAccompaniment">
- insert into music_sheet_accompaniment
- (music_sheet_id_,music_subject_,audio_file_url_,sort_number_,create_time_,create_by_)
- values
- (#{musicSheetId},#{musicSubject},#{audioFileUrl},#{sortNumber},sysdate(),#{createBy})
- </insert>
- <update id="update" parameterType="MusicSheetAccompaniment">
- update music_sheet_accompaniment
- <set>
- <if test="musicSheetId != null">
- music_sheet_id_ = #{musicSheetId},
- </if>
- <if test="musicSubject != null and musicSubject != ''">
- music_subject_ = #{musicSubject},
- </if>
- <if test="audioFileUrl != null and audioFileUrl != ''">
- audio_file_url_ = #{audioFileUrl},
- </if>
- <if test="sortNumber != null">
- sort_number_ = #{sortNumber},
- </if>
- <if test="createTime != null">
- create_time_ = #{createTime},
- </if>
- <if test="createBy != null">
- create_by_ = #{createBy},
- </if>
- </set>
- where id = #{id}
- </update>
- <select id="findList" parameterType="MusicSheetAccompaniment" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from music_sheet_accompaniment
- where 1=1
- <if test="musicSheetId != null">
- and music_sheet_id_ = #{musicSheetId}
- </if>
- <if test="musicSubject != null and musicSubject != ''">
- and music_subject_ = #{musicSubject}
- </if>
- <if test="audioFileUrl != null and audioFileUrl != ''">
- and audio_file_url_ = #{audioFileUrl}
- </if>
- <if test="sortNumber != null">
- and sort_number_ = #{sortNumber}
- </if>
- <if test="createTime != null">
- and create_time_ = #{createTime}
- </if>
- <if test="createBy != null">
- and create_by_ = #{createBy}
- </if>
- </select>
-
-
- <delete id="delete" >
- DELETE FROM music_sheet_accompaniment WHERE id_ = #{id}
- </delete>
-
-
- <select id="queryPage" resultMap="BaseResultMap" parameterType="map">
- SELECT * FROM music_sheet_accompaniment ORDER BY id_ <include refid="global.limit"/>
- </select>
-
-
- <select id="queryCount" resultType="int">
- SELECT COUNT(*) FROM music_sheet_accompaniment
- </select>
- </mapper>
|