TVipCardParkCustRelMapper.xml 14 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.TVipCardParkCustRelMapper">
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TVipCardParkCustRel">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="cust_id" jdbcType="VARCHAR" property="custId" />
    <result column="cust_card_no" jdbcType="VARCHAR" property="custCardNo" />
    <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_empid" jdbcType="BIGINT" property="createEmpid" />
    <result column="create_name" jdbcType="VARCHAR" property="createName" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modify_empid" jdbcType="BIGINT" property="modifyEmpid" />
    <result column="modify_name" jdbcType="VARCHAR" property="modifyName" />
    <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
    <result column="push_state" jdbcType="INTEGER" property="pushState" />
    <result column="card_buy_type" jdbcType="INTEGER" property="cardBuyType" />
    <result column="record_no" jdbcType="VARCHAR" property="recordNo" />
  </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, cust_id, cust_card_no, pl_no, car_number, data_state, create_empid, create_name, 
    create_date, modify_empid, modify_name, modify_date, push_state, card_buy_type, record_no
  </sql>
  <select id="selectByExample" parameterType="com.zteits.bill.domain.TVipCardParkCustRelExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_vip_card_park_cust_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 t_vip_card_park_cust_rel
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from t_vip_card_park_cust_rel
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.bill.domain.TVipCardParkCustRelExample">
    delete from t_vip_card_park_cust_rel
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TVipCardParkCustRel">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_vip_card_park_cust_rel (cust_id, cust_card_no, pl_no, 
      car_number, data_state, create_empid, 
      create_name, create_date, modify_empid, 
      modify_name, modify_date, push_state, 
      card_buy_type, record_no)
    values (#{custId,jdbcType=VARCHAR}, #{custCardNo,jdbcType=VARCHAR}, #{plNo,jdbcType=VARCHAR}, 
      #{carNumber,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=BIGINT}, 
      #{createName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{modifyEmpid,jdbcType=BIGINT}, 
      #{modifyName,jdbcType=VARCHAR}, #{modifyDate,jdbcType=TIMESTAMP}, #{pushState,jdbcType=INTEGER}, 
      #{cardBuyType,jdbcType=INTEGER}, #{recordNo,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.bill.domain.TVipCardParkCustRel">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_vip_card_park_cust_rel
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="custId != null">
        cust_id,
      </if>
      <if test="custCardNo != null">
        cust_card_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_empid,
      </if>
      <if test="createName != null">
        create_name,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="modifyEmpid != null">
        modify_empid,
      </if>
      <if test="modifyName != null">
        modify_name,
      </if>
      <if test="modifyDate != null">
        modify_date,
      </if>
      <if test="pushState != null">
        push_state,
      </if>
      <if test="cardBuyType != null">
        card_buy_type,
      </if>
      <if test="recordNo != null">
        record_no,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="custId != null">
        #{custId,jdbcType=VARCHAR},
      </if>
      <if test="custCardNo != null">
        #{custCardNo,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=BIGINT},
      </if>
      <if test="createName != null">
        #{createName,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpid != null">
        #{modifyEmpid,jdbcType=BIGINT},
      </if>
      <if test="modifyName != null">
        #{modifyName,jdbcType=VARCHAR},
      </if>
      <if test="modifyDate != null">
        #{modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="pushState != null">
        #{pushState,jdbcType=INTEGER},
      </if>
      <if test="cardBuyType != null">
        #{cardBuyType,jdbcType=INTEGER},
      </if>
      <if test="recordNo != null">
        #{recordNo,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.bill.domain.TVipCardParkCustRelExample" resultType="java.lang.Long">
    select count(*) from t_vip_card_park_cust_rel
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update t_vip_card_park_cust_rel
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.custId != null">
        cust_id = #{record.custId,jdbcType=VARCHAR},
      </if>
      <if test="record.custCardNo != null">
        cust_card_no = #{record.custCardNo,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_empid = #{record.createEmpid,jdbcType=BIGINT},
      </if>
      <if test="record.createName != null">
        create_name = #{record.createName,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=BIGINT},
      </if>
      <if test="record.modifyName != null">
        modify_name = #{record.modifyName,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.cardBuyType != null">
        card_buy_type = #{record.cardBuyType,jdbcType=INTEGER},
      </if>
      <if test="record.recordNo != null">
        record_no = #{record.recordNo,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update t_vip_card_park_cust_rel
    set id = #{record.id,jdbcType=BIGINT},
      cust_id = #{record.custId,jdbcType=VARCHAR},
      cust_card_no = #{record.custCardNo,jdbcType=VARCHAR},
      pl_no = #{record.plNo,jdbcType=VARCHAR},
      car_number = #{record.carNumber,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_empid = #{record.createEmpid,jdbcType=BIGINT},
      create_name = #{record.createName,jdbcType=VARCHAR},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      modify_empid = #{record.modifyEmpid,jdbcType=BIGINT},
      modify_name = #{record.modifyName,jdbcType=VARCHAR},
      modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
      push_state = #{record.pushState,jdbcType=INTEGER},
      card_buy_type = #{record.cardBuyType,jdbcType=INTEGER},
      record_no = #{record.recordNo,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.bill.domain.TVipCardParkCustRel">
    update t_vip_card_park_cust_rel
    <set>
      <if test="custId != null">
        cust_id = #{custId,jdbcType=VARCHAR},
      </if>
      <if test="custCardNo != null">
        cust_card_no = #{custCardNo,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_empid = #{createEmpid,jdbcType=BIGINT},
      </if>
      <if test="createName != null">
        create_name = #{createName,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpid != null">
        modify_empid = #{modifyEmpid,jdbcType=BIGINT},
      </if>
      <if test="modifyName != null">
        modify_name = #{modifyName,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="cardBuyType != null">
        card_buy_type = #{cardBuyType,jdbcType=INTEGER},
      </if>
      <if test="recordNo != null">
        record_no = #{recordNo,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.bill.domain.TVipCardParkCustRel">
    update t_vip_card_park_cust_rel
    set cust_id = #{custId,jdbcType=VARCHAR},
      cust_card_no = #{custCardNo,jdbcType=VARCHAR},
      pl_no = #{plNo,jdbcType=VARCHAR},
      car_number = #{carNumber,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=BIGINT},
      create_name = #{createName,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_empid = #{modifyEmpid,jdbcType=BIGINT},
      modify_name = #{modifyName,jdbcType=VARCHAR},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      push_state = #{pushState,jdbcType=INTEGER},
      card_buy_type = #{cardBuyType,jdbcType=INTEGER},
      record_no = #{recordNo,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>

</mapper>