TdBCustBindingMapper.xml 6.15 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.pay.mapper.TdBCustBindingMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdBCustBinding" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="cust_id" property="custId" jdbcType="VARCHAR" />
    <result column="binding_type" property="bindingType" jdbcType="BIGINT" />
    <result column="binding_id" property="bindingId" jdbcType="VARCHAR" />
    <result column="data_state" property="dataState" jdbcType="INTEGER" />
    <result column="create_empid" property="createEmpid" jdbcType="VARCHAR" />
    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
    <result column="modfiy_empid" property="modfiyEmpid" jdbcType="VARCHAR" />
    <result column="modfiy_date" property="modfiyDate" jdbcType="TIMESTAMP" />
    <result column="rsrv_str1" property="rsrvStr1" jdbcType="VARCHAR" />
    <result column="rsrv_str2" property="rsrvStr2" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, cust_id, binding_type, binding_id, data_state, create_empid, create_date, modfiy_empid, 
    modfiy_date, rsrv_str1, rsrv_str2
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from td_b_cust_binding
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from td_b_cust_binding
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdBCustBinding" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_cust_binding (cust_id, binding_type, binding_id, 
      data_state, create_empid, create_date, 
      modfiy_empid, modfiy_date, rsrv_str1, 
      rsrv_str2)
    values (#{custId,jdbcType=VARCHAR}, #{bindingType,jdbcType=BIGINT}, #{bindingId,jdbcType=VARCHAR}, 
      #{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{modfiyEmpid,jdbcType=VARCHAR}, #{modfiyDate,jdbcType=TIMESTAMP}, #{rsrvStr1,jdbcType=VARCHAR}, 
      #{rsrvStr2,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.TdBCustBinding" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_cust_binding
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="custId != null" >
        cust_id,
      </if>
      <if test="bindingType != null" >
        binding_type,
      </if>
      <if test="bindingId != null" >
        binding_id,
      </if>
      <if test="dataState != null" >
        data_state,
      </if>
      <if test="createEmpid != null" >
        create_empid,
      </if>
      <if test="createDate != null" >
        create_date,
      </if>
      <if test="modfiyEmpid != null" >
        modfiy_empid,
      </if>
      <if test="modfiyDate != null" >
        modfiy_date,
      </if>
      <if test="rsrvStr1 != null" >
        rsrv_str1,
      </if>
      <if test="rsrvStr2 != null" >
        rsrv_str2,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="custId != null" >
        #{custId,jdbcType=VARCHAR},
      </if>
      <if test="bindingType != null" >
        #{bindingType,jdbcType=BIGINT},
      </if>
      <if test="bindingId != null" >
        #{bindingId,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="modfiyEmpid != null" >
        #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null" >
        #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="rsrvStr1 != null" >
        #{rsrvStr1,jdbcType=VARCHAR},
      </if>
      <if test="rsrvStr2 != null" >
        #{rsrvStr2,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.TdBCustBinding" >
    update td_b_cust_binding
    <set >
      <if test="custId != null" >
        cust_id = #{custId,jdbcType=VARCHAR},
      </if>
      <if test="bindingType != null" >
        binding_type = #{bindingType,jdbcType=BIGINT},
      </if>
      <if test="bindingId != null" >
        binding_id = #{bindingId,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="modfiyEmpid != null" >
        modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null" >
        modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="rsrvStr1 != null" >
        rsrv_str1 = #{rsrvStr1,jdbcType=VARCHAR},
      </if>
      <if test="rsrvStr2 != null" >
        rsrv_str2 = #{rsrvStr2,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.TdBCustBinding" >
    update td_b_cust_binding
    set cust_id = #{custId,jdbcType=VARCHAR},
      binding_type = #{bindingType,jdbcType=BIGINT},
      binding_id = #{bindingId,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      rsrv_str1 = #{rsrvStr1,jdbcType=VARCHAR},
      rsrv_str2 = #{rsrvStr2,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>