<?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.izouma.awesomeadmin.dao.GenTestTableMapper" >
	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.GenTestTable" >
		<id column="id" property="id" jdbcType="INTEGER" />
		<result column="my_column" property="myColumn" jdbcType="VARCHAR" />
		<result column="aaa_test" property="aaaTest" jdbcType="VARCHAR" />
		<result column="bbb_flag" property="bbbFlag" jdbcType="CHAR" />
		<result column="no_comment" property="noComment" jdbcType="VARCHAR" />
		<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
		<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
	</resultMap>
	<sql id="Base_Column_List" >
		 id, my_column, aaa_test, bbb_flag, no_comment, create_time, update_time, del_flag
	</sql>
	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
		select
		<include refid="Base_Column_List" />
		from gen_test_table
		where id = #{id,jdbcType=INTEGER}
	</select>
	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
		delete from gen_test_table
		where id = #{id,jdbcType=INTEGER}
	</delete>
	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.GenTestTable" useGeneratedKeys="true" keyProperty="id">
		insert into gen_test_table
		<trim prefix="(" suffix=")" suffixOverrides="," >
			<if test="id != null" >
				id,	
			</if>
			<if test="myColumn != null" >
				my_column,	
			</if>
			<if test="aaaTest != null" >
				aaa_test,	
			</if>
			<if test="bbbFlag != null" >
				bbb_flag,	
			</if>
			<if test="noComment != null" >
				no_comment,	
			</if>
			<if test="createTime != null" >
				create_time,	
			</if>
			<if test="updateTime != null" >
				update_time,	
			</if>
			<if test="delFlag != null" >
				del_flag,	
			</if>
		</trim>
		<trim prefix="values (" suffix=")" suffixOverrides="," >
			<if test="id != null" >
				#{id,jdbcType=INTEGER},	
			</if>
			<if test="myColumn != null" >
				#{myColumn,jdbcType=VARCHAR},	
			</if>
			<if test="aaaTest != null" >
				#{aaaTest,jdbcType=VARCHAR},	
			</if>
			<if test="bbbFlag != null" >
				#{bbbFlag,jdbcType=CHAR},	
			</if>
			<if test="noComment != null" >
				#{noComment,jdbcType=VARCHAR},	
			</if>
			<if test="createTime != null" >
				#{createTime,jdbcType=TIMESTAMP},	
			</if>
			<if test="updateTime != null" >
				#{updateTime,jdbcType=TIMESTAMP},	
			</if>
			<if test="delFlag != null" >
				#{delFlag,jdbcType=CHAR},	
			</if>
		</trim>
	</insert>
	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.GenTestTable" >
		update gen_test_table
		<set >
			<if test="myColumn != null" >
				my_column = #{myColumn,jdbcType=VARCHAR},	
			</if>
			<if test="aaaTest != null" >
				aaa_test = #{aaaTest,jdbcType=VARCHAR},	
			</if>
			<if test="bbbFlag != null" >
				bbb_flag = #{bbbFlag,jdbcType=CHAR},	
			</if>
			<if test="noComment != null" >
				no_comment = #{noComment,jdbcType=VARCHAR},	
			</if>
			<if test="createTime != null" >
				create_time = #{createTime,jdbcType=TIMESTAMP},	
			</if>
			<if test="updateTime != null" >
				update_time = #{updateTime,jdbcType=TIMESTAMP},	
			</if>
			<if test="delFlag != null" >
				del_flag = #{delFlag,jdbcType=CHAR},	
			</if>
		</set>
		where id = #{id,jdbcType=INTEGER}
	</update>
	<select id="queryGenTestTablesByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenTestTable">
		select <include refid="Base_Column_List"/> from gen_test_table
		<where>
			and del_flag = 'N'
			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
				and id = #{record.id}	
			</if>
			<if test="record.myColumn != null and !&quot;&quot;.equals(record.myColumn)">
				and my_column = #{record.myColumn}	
			</if>
			<if test="record.aaaTest != null and !&quot;&quot;.equals(record.aaaTest)">
				and aaa_test = #{record.aaaTest}	
			</if>
			<if test="record.bbbFlag != null and !&quot;&quot;.equals(record.bbbFlag)">
				and bbb_flag = #{record.bbbFlag}	
			</if>
			<if test="record.noComment != null and !&quot;&quot;.equals(record.noComment)">
				and no_comment = #{record.noComment}	
			</if>
			<if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
				and create_time = #{record.createTime}	
			</if>
			<if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
				and update_time = #{record.updateTime}	
			</if>
			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
				and del_flag = #{record.delFlag}	
			</if>
		</where>
		order by id desc
	</select>
	<select id="queryAllGenTestTable" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenTestTable">
		select <include refid="Base_Column_List"/> from gen_test_table
		<where>
			and del_flag = 'N'
			<if test="id != null and !&quot;&quot;.equals(id)">
				and id = #{id}	
			</if>
			<if test="myColumn != null and !&quot;&quot;.equals(myColumn)">
				and my_column = #{myColumn}	
			</if>
			<if test="aaaTest != null and !&quot;&quot;.equals(aaaTest)">
				and aaa_test = #{aaaTest}	
			</if>
			<if test="bbbFlag != null and !&quot;&quot;.equals(bbbFlag)">
				and bbb_flag = #{bbbFlag}	
			</if>
			<if test="noComment != null and !&quot;&quot;.equals(noComment)">
				and no_comment = #{noComment}	
			</if>
			<if test="createTime != null and !&quot;&quot;.equals(createTime)">
				and create_time = #{createTime}	
			</if>
			<if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
				and update_time = #{updateTime}	
			</if>
			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
				and del_flag = #{delFlag}	
			</if>
		</where>
		order by id desc
	</select>
	<select id="queryGenTestTable" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenTestTable">
		select <include refid="Base_Column_List"/> from gen_test_table
		<where>
			and del_flag = 'N'
			<if test="id != null and !&quot;&quot;.equals(id)">
				and id = #{id}	
			</if>
			<if test="myColumn != null and !&quot;&quot;.equals(myColumn)">
				and my_column = #{myColumn}	
			</if>
			<if test="aaaTest != null and !&quot;&quot;.equals(aaaTest)">
				and aaa_test = #{aaaTest}	
			</if>
			<if test="bbbFlag != null and !&quot;&quot;.equals(bbbFlag)">
				and bbb_flag = #{bbbFlag}	
			</if>
			<if test="noComment != null and !&quot;&quot;.equals(noComment)">
				and no_comment = #{noComment}	
			</if>
			<if test="createTime != null and !&quot;&quot;.equals(createTime)">
				and create_time = #{createTime}	
			</if>
			<if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
				and update_time = #{updateTime}	
			</if>
			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
				and del_flag = #{delFlag}	
			</if>
		</where>
		LIMIT 1
	</select>
	<update id="delete">
		UPDATE gen_test_table SET del_flag = 'Y'
		<where>
			AND id = #{id}
		</where>
	</update>
</mapper>

