TdCAcctPersonChangeMapper.xml 14.5 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.TdCAcctPersonChangeMapper">
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdCAcctPersonChange">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="acct_id" jdbcType="VARCHAR" property="acctId" />
    <result column="cust_id" jdbcType="VARCHAR" property="custId" />
    <result column="acct_type" jdbcType="INTEGER" property="acctType" />
    <result column="acct_balance" jdbcType="DECIMAL" property="acctBalance" />
    <result column="acct_default_balance" jdbcType="DECIMAL" property="acctDefaultBalance" />
    <result column="change_acct_balance" jdbcType="DECIMAL" property="changeAcctBalance" />
    <result column="change_acct_default_balance" jdbcType="DECIMAL" property="changeAcctDefaultBalance" />
    <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="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" />
    <result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
    <result column="org_id" jdbcType="BIGINT" property="orgId" />
    <result column="org_name" jdbcType="VARCHAR" property="orgName" />
  </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, acct_id, cust_id, acct_type, acct_balance, acct_default_balance, change_acct_balance, 
    change_acct_default_balance, data_state, create_empid, create_date, modfiy_empid, 
    modfiy_date, org_id, org_name
  </sql>
  <select id="selectByExample" parameterType="com.zteits.pay.domain.TdCAcctPersonChangeExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    'true' as QUERYID,
    <include refid="Base_Column_List" />
    from td_c_acct_person_change
    <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 td_c_acct_person_change
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from td_c_acct_person_change
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.pay.domain.TdCAcctPersonChangeExample">
    delete from td_c_acct_person_change
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdCAcctPersonChange">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_acct_person_change (acct_id, cust_id, acct_type, 
      acct_balance, acct_default_balance, change_acct_balance, 
      change_acct_default_balance, data_state, create_empid, 
      create_date, modfiy_empid, modfiy_date, 
      org_id, org_name)
    values (#{acctId,jdbcType=VARCHAR}, #{custId,jdbcType=VARCHAR}, #{acctType,jdbcType=INTEGER}, 
      #{acctBalance,jdbcType=DECIMAL}, #{acctDefaultBalance,jdbcType=DECIMAL}, #{changeAcctBalance,jdbcType=DECIMAL}, 
      #{changeAcctDefaultBalance,jdbcType=DECIMAL}, #{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=VARCHAR}, 
      #{createDate,jdbcType=TIMESTAMP}, #{modfiyEmpid,jdbcType=VARCHAR}, #{modfiyDate,jdbcType=TIMESTAMP}, 
      #{orgId,jdbcType=BIGINT}, #{orgName,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.TdCAcctPersonChange">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_acct_person_change
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="acctId != null">
        acct_id,
      </if>
      <if test="custId != null">
        cust_id,
      </if>
      <if test="acctType != null">
        acct_type,
      </if>
      <if test="acctBalance != null">
        acct_balance,
      </if>
      <if test="acctDefaultBalance != null">
        acct_default_balance,
      </if>
      <if test="changeAcctBalance != null">
        change_acct_balance,
      </if>
      <if test="changeAcctDefaultBalance != null">
        change_acct_default_balance,
      </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="orgId != null">
        org_id,
      </if>
      <if test="orgName != null">
        org_name,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="acctId != null">
        #{acctId,jdbcType=VARCHAR},
      </if>
      <if test="custId != null">
        #{custId,jdbcType=VARCHAR},
      </if>
      <if test="acctType != null">
        #{acctType,jdbcType=INTEGER},
      </if>
      <if test="acctBalance != null">
        #{acctBalance,jdbcType=DECIMAL},
      </if>
      <if test="acctDefaultBalance != null">
        #{acctDefaultBalance,jdbcType=DECIMAL},
      </if>
      <if test="changeAcctBalance != null">
        #{changeAcctBalance,jdbcType=DECIMAL},
      </if>
      <if test="changeAcctDefaultBalance != null">
        #{changeAcctDefaultBalance,jdbcType=DECIMAL},
      </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="orgId != null">
        #{orgId,jdbcType=BIGINT},
      </if>
      <if test="orgName != null">
        #{orgName,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.pay.domain.TdCAcctPersonChangeExample" resultType="java.lang.Long">
    select count(*) from td_c_acct_person_change
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update td_c_acct_person_change
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.acctId != null">
        acct_id = #{record.acctId,jdbcType=VARCHAR},
      </if>
      <if test="record.custId != null">
        cust_id = #{record.custId,jdbcType=VARCHAR},
      </if>
      <if test="record.acctType != null">
        acct_type = #{record.acctType,jdbcType=INTEGER},
      </if>
      <if test="record.acctBalance != null">
        acct_balance = #{record.acctBalance,jdbcType=DECIMAL},
      </if>
      <if test="record.acctDefaultBalance != null">
        acct_default_balance = #{record.acctDefaultBalance,jdbcType=DECIMAL},
      </if>
      <if test="record.changeAcctBalance != null">
        change_acct_balance = #{record.changeAcctBalance,jdbcType=DECIMAL},
      </if>
      <if test="record.changeAcctDefaultBalance != null">
        change_acct_default_balance = #{record.changeAcctDefaultBalance,jdbcType=DECIMAL},
      </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.modfiyEmpid != null">
        modfiy_empid = #{record.modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="record.modfiyDate != null">
        modfiy_date = #{record.modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=BIGINT},
      </if>
      <if test="record.orgName != null">
        org_name = #{record.orgName,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update td_c_acct_person_change
    set id = #{record.id,jdbcType=BIGINT},
      acct_id = #{record.acctId,jdbcType=VARCHAR},
      cust_id = #{record.custId,jdbcType=VARCHAR},
      acct_type = #{record.acctType,jdbcType=INTEGER},
      acct_balance = #{record.acctBalance,jdbcType=DECIMAL},
      acct_default_balance = #{record.acctDefaultBalance,jdbcType=DECIMAL},
      change_acct_balance = #{record.changeAcctBalance,jdbcType=DECIMAL},
      change_acct_default_balance = #{record.changeAcctDefaultBalance,jdbcType=DECIMAL},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_empid = #{record.createEmpid,jdbcType=VARCHAR},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{record.modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{record.modfiyDate,jdbcType=TIMESTAMP},
      org_id = #{record.orgId,jdbcType=BIGINT},
      org_name = #{record.orgName,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.TdCAcctPersonChange">
    update td_c_acct_person_change
    <set>
      <if test="acctId != null">
        acct_id = #{acctId,jdbcType=VARCHAR},
      </if>
      <if test="custId != null">
        cust_id = #{custId,jdbcType=VARCHAR},
      </if>
      <if test="acctType != null">
        acct_type = #{acctType,jdbcType=INTEGER},
      </if>
      <if test="acctBalance != null">
        acct_balance = #{acctBalance,jdbcType=DECIMAL},
      </if>
      <if test="acctDefaultBalance != null">
        acct_default_balance = #{acctDefaultBalance,jdbcType=DECIMAL},
      </if>
      <if test="changeAcctBalance != null">
        change_acct_balance = #{changeAcctBalance,jdbcType=DECIMAL},
      </if>
      <if test="changeAcctDefaultBalance != null">
        change_acct_default_balance = #{changeAcctDefaultBalance,jdbcType=DECIMAL},
      </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="orgId != null">
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
      <if test="orgName != null">
        org_name = #{orgName,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.TdCAcctPersonChange">
    update td_c_acct_person_change
    set acct_id = #{acctId,jdbcType=VARCHAR},
      cust_id = #{custId,jdbcType=VARCHAR},
      acct_type = #{acctType,jdbcType=INTEGER},
      acct_balance = #{acctBalance,jdbcType=DECIMAL},
      acct_default_balance = #{acctDefaultBalance,jdbcType=DECIMAL},
      change_acct_balance = #{changeAcctBalance,jdbcType=DECIMAL},
      change_acct_default_balance = #{changeAcctDefaultBalance,jdbcType=DECIMAL},
      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},
      org_id = #{orgId,jdbcType=BIGINT},
      org_name = #{orgName,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>