TdCCustSignMapper.xml 6.92 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.TdCCustSignMapper">
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdCCustSign">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="cust_id" jdbcType="VARCHAR" property="custId" />
    <result column="sign_date" jdbcType="TIMESTAMP" property="signDate" />
    <result column="sign_source" jdbcType="INTEGER" property="signSource" />
    <result column="lon_id" jdbcType="DECIMAL" property="lonId" />
    <result column="lat_id" jdbcType="DECIMAL" property="latId" />
    <result column="sign_score" jdbcType="INTEGER" property="signScore" />
    <result column="continue_sign_num" jdbcType="INTEGER" property="continueSignNum" />
    <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" />
  </resultMap>
  <sql id="Base_Column_List">
    id, cust_id, sign_date, sign_source, lon_id, lat_id, sign_score, continue_sign_num, 
    data_state, create_empid, create_date, modfiy_empid, modfiy_date
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from td_c_cust_sign
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from td_c_cust_sign
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdCCustSign">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_cust_sign (cust_id, sign_date, sign_source, 
      lon_id, lat_id, sign_score, 
      continue_sign_num, data_state, create_empid, 
      create_date, modfiy_empid, modfiy_date
      )
    values (#{custId,jdbcType=VARCHAR}, #{signDate,jdbcType=TIMESTAMP}, #{signSource,jdbcType=INTEGER}, 
      #{lonId,jdbcType=DECIMAL}, #{latId,jdbcType=DECIMAL}, #{signScore,jdbcType=INTEGER}, 
      #{continueSignNum,jdbcType=INTEGER}, #{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=VARCHAR}, 
      #{createDate,jdbcType=TIMESTAMP}, #{modfiyEmpid,jdbcType=VARCHAR}, #{modfiyDate,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.TdCCustSign">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_cust_sign
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="custId != null">
        cust_id,
      </if>
      <if test="signDate != null">
        sign_date,
      </if>
      <if test="signSource != null">
        sign_source,
      </if>
      <if test="lonId != null">
        lon_id,
      </if>
      <if test="latId != null">
        lat_id,
      </if>
      <if test="signScore != null">
        sign_score,
      </if>
      <if test="continueSignNum != null">
        continue_sign_num,
      </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>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="custId != null">
        #{custId,jdbcType=VARCHAR},
      </if>
      <if test="signDate != null">
        #{signDate,jdbcType=TIMESTAMP},
      </if>
      <if test="signSource != null">
        #{signSource,jdbcType=INTEGER},
      </if>
      <if test="lonId != null">
        #{lonId,jdbcType=DECIMAL},
      </if>
      <if test="latId != null">
        #{latId,jdbcType=DECIMAL},
      </if>
      <if test="signScore != null">
        #{signScore,jdbcType=INTEGER},
      </if>
      <if test="continueSignNum != null">
        #{continueSignNum,jdbcType=INTEGER},
      </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>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.TdCCustSign">
    update td_c_cust_sign
    <set>
      <if test="custId != null">
        cust_id = #{custId,jdbcType=VARCHAR},
      </if>
      <if test="signDate != null">
        sign_date = #{signDate,jdbcType=TIMESTAMP},
      </if>
      <if test="signSource != null">
        sign_source = #{signSource,jdbcType=INTEGER},
      </if>
      <if test="lonId != null">
        lon_id = #{lonId,jdbcType=DECIMAL},
      </if>
      <if test="latId != null">
        lat_id = #{latId,jdbcType=DECIMAL},
      </if>
      <if test="signScore != null">
        sign_score = #{signScore,jdbcType=INTEGER},
      </if>
      <if test="continueSignNum != null">
        continue_sign_num = #{continueSignNum,jdbcType=INTEGER},
      </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>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.TdCCustSign">
    update td_c_cust_sign
    set cust_id = #{custId,jdbcType=VARCHAR},
      sign_date = #{signDate,jdbcType=TIMESTAMP},
      sign_source = #{signSource,jdbcType=INTEGER},
      lon_id = #{lonId,jdbcType=DECIMAL},
      lat_id = #{latId,jdbcType=DECIMAL},
      sign_score = #{signScore,jdbcType=INTEGER},
      continue_sign_num = #{continueSignNum,jdbcType=INTEGER},
      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}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>