| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <?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.TestAaaMapper" >
- <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.TestAaa" >
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="del_flag" property="delFlag" jdbcType="CHAR" />
- <result column="test_name" property="testName" jdbcType="VARCHAR" />
- <result column="remark" property="remark" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, del_flag, test_name, remark </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from test_aaa
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from test_aaa
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.TestAaa" useGeneratedKeys="true" keyProperty="id">
- insert into test_aaa
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="delFlag!= null" >
- del_flag,
- </if>
- <if test="testName!= null" >
- test_name,
- </if>
- <if test="remark!= null" >
- remark,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="delFlag != null" >
- #{delFlag,jdbcType=CHAR},
- </if>
- <if test="testName != null" >
- #{testName,jdbcType=VARCHAR},
- </if>
- <if test="remark != null" >
- #{remark,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.TestAaa" >
- update test_aaa
- <set >
- <if test="delFlag != null" >
- del_flag= #{delFlag,jdbcType=CHAR},
- </if>
- <if test="testName != null" >
- test_name= #{testName,jdbcType=VARCHAR},
- </if>
- <if test="remark != null" >
- remark= #{remark,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <select id="queryTestAaaByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestAaa">
- select <include refid="Base_Column_List"/> from test_aaa
- <where>
- and del_flag = 'N'
- <if test="record.id != null and !"".equals(record.id)">
- and id = #{record.id}
- </if>
- <if test="record.delFlag != null and !"".equals(record.delFlag)">
- and del_flag = #{record.delFlag}
- </if>
- <if test="record.testName != null and !"".equals(record.testName)">
- and test_name = #{record.testName}
- </if>
- <if test="record.remark != null and !"".equals(record.remark)">
- and remark = #{record.remark}
- </if>
- </where>
- order by id desc
- </select>
- <select id="queryAllTestAaa" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestAaa">
- select <include refid="Base_Column_List"/> from test_aaa
- <where>
- and del_flag = 'N'
- <if test="id != null and !"".equals(id)">
- and id = #{id}
- </if>
- <if test="delFlag != null and !"".equals(delFlag)">
- and del_flag = #{delFlag}
- </if>
- <if test="testName != null and !"".equals(testName)">
- and test_name = #{testName}
- </if>
- <if test="remark != null and !"".equals(remark)">
- and remark = #{remark}
- </if>
- </where>
- order by id desc
- </select>
- <select id="queryTestAaa" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestAaa">
- select top 1 <include refid="Base_Column_List"/> from test_aaa
- <where>
- and del_flag = 'N'
- <if test="id != null and !"".equals(id)">
- and id = #{id}
- </if>
- <if test="delFlag != null and !"".equals(delFlag)">
- and del_flag = #{delFlag}
- </if>
- <if test="testName != null and !"".equals(testName)">
- and test_name = #{testName}
- </if>
- <if test="remark != null and !"".equals(remark)">
- and remark = #{remark}
- </if>
-
- </where>
- </select>
- <update id="delete">
- UPDATE test_aaa SET del_flag = 'Y'
- <where>
- AND id = #{id}
- </where>
- </update>
- <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TestAaa">
- select <include refid="Base_Column_List"/> from test_aaa
- <where>
- and del_flag = 'N'
- </where>
- order by id desc
- </select>
- </mapper>
|