|  | @@ -5,86 +5,83 @@
 | 
	
		
			
				|  |  |  不要修改此文件。所有改动将在下次重新自动生成时丢失。
 | 
	
		
			
				|  |  |  -->
 | 
	
		
			
				|  |  |  <mapper namespace="com.yonge.cooleshow.biz.dal.dao.MusicAlbumDao">
 | 
	
		
			
				|  |  | -	
 | 
	
		
			
				|  |  | -	<resultMap type="com.yonge.cooleshow.biz.dal.entity.MusicAlbum" id="MusicAlbum">
 | 
	
		
			
				|  |  | -		<result column="id_" property="id" />
 | 
	
		
			
				|  |  | -		<result column="album_name_" property="albumName" />
 | 
	
		
			
				|  |  | -		<result column="album_desc_" property="albumDesc" />
 | 
	
		
			
				|  |  | -		<result column="album_tag_" property="albumTag" />
 | 
	
		
			
				|  |  | -		<result column="album_cover_url_" property="albumCoverUrl" />
 | 
	
		
			
				|  |  | -		<result column="album_status_" property="albumStatus" />
 | 
	
		
			
				|  |  | -		<result column="order_no_" property="orderNo" />
 | 
	
		
			
				|  |  | -		<result column="hot_flag_" property="hotFlag" />
 | 
	
		
			
				|  |  | -		<result column="top_flag_" property="topFlag" />
 | 
	
		
			
				|  |  | -		<result column="create_time_" property="createTime" />
 | 
	
		
			
				|  |  | -		<result column="create_user_" property="createUser" />
 | 
	
		
			
				|  |  | -		<result column="update_time_" property="updateTime" />
 | 
	
		
			
				|  |  | -		<result column="update_user_" property="updateUser" />
 | 
	
		
			
				|  |  | -	</resultMap>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.MusicAlbum">
 | 
	
		
			
				|  |  | +        <id column="id" jdbcType="BIGINT" property="id" />
 | 
	
		
			
				|  |  | +        <result column="album_name_" jdbcType="VARCHAR" property="albumName" />
 | 
	
		
			
				|  |  | +        <result column="album_desc_" jdbcType="VARCHAR" property="albumDesc" />
 | 
	
		
			
				|  |  | +        <result column="album_tag_" jdbcType="VARCHAR" property="albumTag" />
 | 
	
		
			
				|  |  | +        <result column="album_cover_url_" jdbcType="VARCHAR" property="albumCoverUrl" />
 | 
	
		
			
				|  |  | +        <result column="album_status_" jdbcType="TINYINT" property="albumStatus" />
 | 
	
		
			
				|  |  | +        <result column="order_no_" jdbcType="INTEGER" property="orderNo" />
 | 
	
		
			
				|  |  | +        <result column="hot_flag_" jdbcType="TINYINT" property="hotFlag" />
 | 
	
		
			
				|  |  | +        <result column="top_flag_" jdbcType="TINYINT" property="topFlag" />
 | 
	
		
			
				|  |  | +        <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
 | 
	
		
			
				|  |  | +        <result column="create_user_" jdbcType="INTEGER" property="createUser" />
 | 
	
		
			
				|  |  | +        <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime" />
 | 
	
		
			
				|  |  | +        <result column="update_user_" jdbcType="INTEGER" property="updateUser" />
 | 
	
		
			
				|  |  | +    </resultMap>
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	<!-- 根据主键查询一条记录 -->
 | 
	
		
			
				|  |  | -	<select id="get" resultMap="MusicAlbum" >
 | 
	
		
			
				|  |  | +	<select id="get" resultMap="BaseResultMap" >
 | 
	
		
			
				|  |  |  		SELECT * FROM music_album WHERE id_ = #{id} 
 | 
	
		
			
				|  |  |  	</select>
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	<!-- 全查询 -->
 | 
	
		
			
				|  |  | -	<select id="findAll" resultMap="MusicAlbum">
 | 
	
		
			
				|  |  | +	<select id="findAll" resultMap="BaseResultMap">
 | 
	
		
			
				|  |  |  		SELECT * FROM music_album ORDER BY id_
 | 
	
		
			
				|  |  |  	</select>
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	<!-- 向数据库增加一条记录 -->
 | 
	
		
			
				|  |  |  	<insert id="insert" parameterType="com.yonge.cooleshow.biz.dal.entity.MusicAlbum" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 | 
	
		
			
				|  |  | -		<!--
 | 
	
		
			
				|  |  | -		<selectKey resultClass="int" keyProperty="id" > 
 | 
	
		
			
				|  |  | -		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
 | 
	
		
			
				|  |  | -		</selectKey>
 | 
	
		
			
				|  |  | -		-->
 | 
	
		
			
				|  |  | -		INSERT INTO music_album (id_,album_name_,album_desc_,album_tag_,album_cover_url_,album_status_,order_no_,hot_flag_,top_flag_,create_time_,create_user_,update_time_,update_user_) VALUES(#{id},#{albumName},#{albumDesc},#{albumTag},#{albumCoverUrl},#{albumStatus},#{orderNo},#{hotFlag},#{topFlag},#{createTime},#{createUser},#{updateTime},#{updateUser})
 | 
	
		
			
				|  |  | -	</insert>
 | 
	
		
			
				|  |  | +        insert into music_album
 | 
	
		
			
				|  |  | +        (album_name_,album_desc_,album_tag_,album_cover_url_,album_status_,order_no_,hot_flag_,top_flag_,create_time_,create_user_,update_time_,update_user_)
 | 
	
		
			
				|  |  | +        values
 | 
	
		
			
				|  |  | +        (#{albumName},#{albumDesc},#{albumTag},#{albumCoverUrl},#{albumStatus},#{orderNo},#{hotFlag},#{topFlag},sysdate(),#{createUser},#{updateTime},#{updateUser})
 | 
	
		
			
				|  |  | +    </insert>
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	<!-- 根据主键查询一条记录 -->
 | 
	
		
			
				|  |  |  	<update id="update" parameterType="com.yonge.cooleshow.biz.dal.entity.MusicAlbum">
 | 
	
		
			
				|  |  | -		UPDATE music_album <set>
 | 
	
		
			
				|  |  | -<if test="orderNo != null">
 | 
	
		
			
				|  |  | -order_no_ = #{orderNo},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="topFlag != null">
 | 
	
		
			
				|  |  | -top_flag_ = #{topFlag},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="createUser != null">
 | 
	
		
			
				|  |  | -create_user_ = #{createUser},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="updateUser != null">
 | 
	
		
			
				|  |  | -update_user_ = #{updateUser},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="id != null">
 | 
	
		
			
				|  |  | -id_ = #{id},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="albumTag != null">
 | 
	
		
			
				|  |  | -album_tag_ = #{albumTag},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="albumCoverUrl != null">
 | 
	
		
			
				|  |  | -album_cover_url_ = #{albumCoverUrl},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="albumDesc != null">
 | 
	
		
			
				|  |  | -album_desc_ = #{albumDesc},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="albumStatus != null">
 | 
	
		
			
				|  |  | -album_status_ = #{albumStatus},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="hotFlag != null">
 | 
	
		
			
				|  |  | -hot_flag_ = #{hotFlag},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="createTime != null">
 | 
	
		
			
				|  |  | -create_time_ = #{createTime},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="updateTime != null">
 | 
	
		
			
				|  |  | -update_time_ = #{updateTime},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -<if test="albumName != null">
 | 
	
		
			
				|  |  | -album_name_ = #{albumName},
 | 
	
		
			
				|  |  | -</if>
 | 
	
		
			
				|  |  | -</set> WHERE id_ = #{id} 
 | 
	
		
			
				|  |  | +		UPDATE music_album
 | 
	
		
			
				|  |  | +        <set>
 | 
	
		
			
				|  |  | +        <if test="albumName != null and albumName != ''">
 | 
	
		
			
				|  |  | +            album_name_ = #{albumName},
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="albumDesc != null and albumDesc != ''">
 | 
	
		
			
				|  |  | +            album_desc_ = #{albumDesc},
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="albumTag != null and albumTag != ''">
 | 
	
		
			
				|  |  | +            album_tag_ = #{albumTag},
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="albumCoverUrl != null and albumCoverUrl != ''">
 | 
	
		
			
				|  |  | +            album_cover_url_ = #{albumCoverUrl},
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="albumStatus != null">
 | 
	
		
			
				|  |  | +            album_status_ = #{albumStatus},
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="orderNo != null">
 | 
	
		
			
				|  |  | +            order_no_ = #{orderNo},
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="hotFlag != null">
 | 
	
		
			
				|  |  | +            hot_flag_ = #{hotFlag},
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="topFlag != null">
 | 
	
		
			
				|  |  | +            top_flag_ = #{topFlag},
 | 
	
		
			
				|  |  | +        </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>
 | 
	
		
			
				|  |  | +        </set> 
 | 
	
		
			
				|  |  | +        WHERE id_ = #{id}
 | 
	
		
			
				|  |  |  	</update>
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	<!-- 根据主键删除一条记录 -->
 | 
	
	
		
			
				|  | @@ -93,7 +90,7 @@ album_name_ = #{albumName},
 | 
	
		
			
				|  |  |  	</delete>
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	<!-- 分页查询 -->
 | 
	
		
			
				|  |  | -	<select id="queryPage" resultMap="MusicAlbum" parameterType="map">
 | 
	
		
			
				|  |  | +	<select id="queryPage" resultMap="BaseResultMap" parameterType="map">
 | 
	
		
			
				|  |  |  		SELECT * FROM music_album ORDER BY id_ <include refid="global.limit"/>
 | 
	
		
			
				|  |  |  	</select>
 | 
	
		
			
				|  |  |  	
 | 
	
	
		
			
				|  | @@ -101,4 +98,46 @@ album_name_ = #{albumName},
 | 
	
		
			
				|  |  |  	<select id="queryCount" resultType="int">
 | 
	
		
			
				|  |  |  		SELECT COUNT(*) FROM music_album
 | 
	
		
			
				|  |  |  	</select>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <select id="findList" parameterType="MusicAlbum" resultMap="BaseResultMap">
 | 
	
		
			
				|  |  | +        select *
 | 
	
		
			
				|  |  | +        from music_album
 | 
	
		
			
				|  |  | +        where 1=1
 | 
	
		
			
				|  |  | +        <if test="albumName != null and albumName != ''">
 | 
	
		
			
				|  |  | +            and album_name_ = #{albumName}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="albumDesc != null and albumDesc != ''">
 | 
	
		
			
				|  |  | +            and album_desc_ = #{albumDesc}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="albumTag != null and albumTag != ''">
 | 
	
		
			
				|  |  | +            and album_tag_ = #{albumTag}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="albumCoverUrl != null and albumCoverUrl != ''">
 | 
	
		
			
				|  |  | +            and album_cover_url_ = #{albumCoverUrl}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="albumStatus != null">
 | 
	
		
			
				|  |  | +            and album_status_ = #{albumStatus}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="orderNo != null">
 | 
	
		
			
				|  |  | +            and order_no_ = #{orderNo}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="hotFlag != null">
 | 
	
		
			
				|  |  | +            and hot_flag_ = #{hotFlag}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="topFlag != null">
 | 
	
		
			
				|  |  | +            and top_flag_ = #{topFlag}
 | 
	
		
			
				|  |  | +        </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>
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  |  </mapper>
 |