TbRWhitelistParkCarRelMapper.xml 13 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.TbRWhitelistParkCarRelMapper">
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TbRWhitelistParkCarRel">
    <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="car_number" jdbcType="VARCHAR" property="carNumber" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
    <result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="modify_emp_id" jdbcType="VARCHAR" property="modifyEmpId" />
    <result column="modify_emp_name" jdbcType="VARCHAR" property="modifyEmpName" />
    <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
    <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, car_number, data_state, create_emp_id, create_emp_name, create_time, 
    modify_emp_id, modify_emp_name, modify_time, push_state, white_state
  </sql>
  <select id="selectByExample" parameterType="com.zteits.bill.domain.TbRWhitelistParkCarRelExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tb_r_whitelist_park_car_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_car_rel
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tb_r_whitelist_park_car_rel
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.bill.domain.TbRWhitelistParkCarRelExample">
    delete from tb_r_whitelist_park_car_rel
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TbRWhitelistParkCarRel">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tb_r_whitelist_park_car_rel (white_r_no, pl_no, car_number, 
      data_state, create_emp_id, create_emp_name, 
      create_time, modify_emp_id, modify_emp_name, 
      modify_time, push_state, white_state
      )
    values (#{whiteRNo,jdbcType=VARCHAR}, #{plNo,jdbcType=VARCHAR}, #{carNumber,jdbcType=VARCHAR}, 
      #{dataState,jdbcType=INTEGER}, #{createEmpId,jdbcType=VARCHAR}, #{createEmpName,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{modifyEmpId,jdbcType=VARCHAR}, #{modifyEmpName,jdbcType=VARCHAR}, 
      #{modifyTime,jdbcType=TIMESTAMP}, #{pushState,jdbcType=INTEGER}, #{whiteState,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.bill.domain.TbRWhitelistParkCarRel">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tb_r_whitelist_park_car_rel
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="whiteRNo != null">
        white_r_no,
      </if>
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="carNumber != null">
        car_number,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createEmpId != null">
        create_emp_id,
      </if>
      <if test="createEmpName != null">
        create_emp_name,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="modifyEmpId != null">
        modify_emp_id,
      </if>
      <if test="modifyEmpName != null">
        modify_emp_name,
      </if>
      <if test="modifyTime != null">
        modify_time,
      </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="carNumber != null">
        #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpId != null">
        #{createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="createEmpName != null">
        #{createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpId != null">
        #{modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modifyEmpName != null">
        #{modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="modifyTime != null">
        #{modifyTime,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.TbRWhitelistParkCarRelExample" resultType="java.lang.Long">
    select count(*) from tb_r_whitelist_park_car_rel
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tb_r_whitelist_park_car_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.carNumber != null">
        car_number = #{record.carNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.createEmpId != null">
        create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.createEmpName != null">
        create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyEmpId != null">
        modify_emp_id = #{record.modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyEmpName != null">
        modify_emp_name = #{record.modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyTime != null">
        modify_time = #{record.modifyTime,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_car_rel
    set id = #{record.id,jdbcType=BIGINT},
      white_r_no = #{record.whiteRNo,jdbcType=VARCHAR},
      pl_no = #{record.plNo,jdbcType=VARCHAR},
      car_number = #{record.carNumber,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      modify_emp_id = #{record.modifyEmpId,jdbcType=VARCHAR},
      modify_emp_name = #{record.modifyEmpName,jdbcType=VARCHAR},
      modify_time = #{record.modifyTime,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.TbRWhitelistParkCarRel">
    update tb_r_whitelist_park_car_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="carNumber != null">
        car_number = #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpId != null">
        create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="createEmpName != null">
        create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpId != null">
        modify_emp_id = #{modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modifyEmpName != null">
        modify_emp_name = #{modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="modifyTime != null">
        modify_time = #{modifyTime,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.TbRWhitelistParkCarRel">
    update tb_r_whitelist_park_car_rel
    set white_r_no = #{whiteRNo,jdbcType=VARCHAR},
      pl_no = #{plNo,jdbcType=VARCHAR},
      car_number = #{carNumber,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      modify_emp_id = #{modifyEmpId,jdbcType=VARCHAR},
      modify_emp_name = #{modifyEmpName,jdbcType=VARCHAR},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      push_state = #{pushState,jdbcType=INTEGER},
      white_state = #{whiteState,jdbcType=INTEGER}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>