TbRWhitelistParkRelMapper.xml 11 KB
<?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.zteits.bill.mapper.TbRWhitelistParkRelMapper">
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TbRWhitelistParkRel">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="white_r_no" jdbcType="VARCHAR" property="whiteRNo" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modify_empid" jdbcType="VARCHAR" property="modifyEmpid" />
    <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
    <result column="push_state" jdbcType="INTEGER" property="pushState" />
    <result column="white_state" jdbcType="INTEGER" property="whiteState" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, white_r_no, pl_no, data_state, create_empid, create_date, modify_empid, modify_date, 
    push_state, white_state
  </sql>
  <select id="selectByExample" parameterType="com.zteits.bill.domain.TbRWhitelistParkRelExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tb_r_whitelist_park_rel
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_r_whitelist_park_rel
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tb_r_whitelist_park_rel
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.bill.domain.TbRWhitelistParkRelExample">
    delete from tb_r_whitelist_park_rel
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TbRWhitelistParkRel">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tb_r_whitelist_park_rel (white_r_no, pl_no, data_state, 
      create_empid, create_date, modify_empid, 
      modify_date, push_state, white_state
      )
    values (#{whiteRNo,jdbcType=VARCHAR}, #{plNo,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createEmpid,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{modifyEmpid,jdbcType=VARCHAR}, 
      #{modifyDate,jdbcType=TIMESTAMP}, #{pushState,jdbcType=INTEGER}, #{whiteState,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.bill.domain.TbRWhitelistParkRel">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tb_r_whitelist_park_rel
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="whiteRNo != null">
        white_r_no,
      </if>
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createEmpid != null">
        create_empid,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="modifyEmpid != null">
        modify_empid,
      </if>
      <if test="modifyDate != null">
        modify_date,
      </if>
      <if test="pushState != null">
        push_state,
      </if>
      <if test="whiteState != null">
        white_state,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="whiteRNo != null">
        #{whiteRNo,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpid != null">
        #{modifyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modifyDate != null">
        #{modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="pushState != null">
        #{pushState,jdbcType=INTEGER},
      </if>
      <if test="whiteState != null">
        #{whiteState,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.bill.domain.TbRWhitelistParkRelExample" resultType="java.lang.Long">
    select count(*) from tb_r_whitelist_park_rel
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tb_r_whitelist_park_rel
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.whiteRNo != null">
        white_r_no = #{record.whiteRNo,jdbcType=VARCHAR},
      </if>
      <if test="record.plNo != null">
        pl_no = #{record.plNo,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.createEmpid != null">
        create_empid = #{record.createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="record.createDate != null">
        create_date = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyEmpid != null">
        modify_empid = #{record.modifyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyDate != null">
        modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.pushState != null">
        push_state = #{record.pushState,jdbcType=INTEGER},
      </if>
      <if test="record.whiteState != null">
        white_state = #{record.whiteState,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tb_r_whitelist_park_rel
    set id = #{record.id,jdbcType=BIGINT},
      white_r_no = #{record.whiteRNo,jdbcType=VARCHAR},
      pl_no = #{record.plNo,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_empid = #{record.createEmpid,jdbcType=VARCHAR},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      modify_empid = #{record.modifyEmpid,jdbcType=VARCHAR},
      modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
      push_state = #{record.pushState,jdbcType=INTEGER},
      white_state = #{record.whiteState,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.bill.domain.TbRWhitelistParkRel">
    update tb_r_whitelist_park_rel
    <set>
      <if test="whiteRNo != null">
        white_r_no = #{whiteRNo,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        create_empid = #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpid != null">
        modify_empid = #{modifyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modifyDate != null">
        modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="pushState != null">
        push_state = #{pushState,jdbcType=INTEGER},
      </if>
      <if test="whiteState != null">
        white_state = #{whiteState,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.bill.domain.TbRWhitelistParkRel">
    update tb_r_whitelist_park_rel
    set white_r_no = #{whiteRNo,jdbcType=VARCHAR},
      pl_no = #{plNo,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_empid = #{modifyEmpid,jdbcType=VARCHAR},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      push_state = #{pushState,jdbcType=INTEGER},
      white_state = #{whiteState,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>