tdCAppConfigMapper.xml 6.57 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.tdCAppConfigMapper">
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.tdCAppConfig">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="app_id" jdbcType="VARCHAR" property="appId" />
    <result column="secret_key" jdbcType="VARCHAR" property="secretKey" />
    <result column="app_type" jdbcType="INTEGER" property="appType" />
    <result column="bus_name" jdbcType="VARCHAR" property="busName" />
    <result column="bus_sys_name" jdbcType="VARCHAR" property="busSysName" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <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, app_id, secret_key, app_type, bus_name, bus_sys_name, remark, 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_app_config
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from td_c_app_config
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.tdCAppConfig">
   <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_app_config (id, app_id, secret_key, 
      app_type, bus_name, bus_sys_name, 
      remark, data_state, create_empid, 
      create_date, modfiy_empid, modfiy_date
      )
    values (#{id,jdbcType=BIGINT}, #{appId,jdbcType=VARCHAR}, #{secretKey,jdbcType=VARCHAR}, 
      #{appType,jdbcType=INTEGER}, #{busName,jdbcType=VARCHAR}, #{busSysName,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=VARCHAR}, 
      #{createDate,jdbcType=TIMESTAMP}, #{modfiyEmpid,jdbcType=VARCHAR}, #{modfiyDate,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.tdCAppConfig">
   <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_app_config
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="appId != null">
        app_id,
      </if>
      <if test="secretKey != null">
        secret_key,
      </if>
      <if test="appType != null">
        app_type,
      </if>
      <if test="busName != null">
        bus_name,
      </if>
      <if test="busSysName != null">
        bus_sys_name,
      </if>
      <if test="remark != null">
        remark,
      </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="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="appId != null">
        #{appId,jdbcType=VARCHAR},
      </if>
      <if test="secretKey != null">
        #{secretKey,jdbcType=VARCHAR},
      </if>
      <if test="appType != null">
        #{appType,jdbcType=INTEGER},
      </if>
      <if test="busName != null">
        #{busName,jdbcType=VARCHAR},
      </if>
      <if test="busSysName != null">
        #{busSysName,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,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>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.tdCAppConfig">
    update td_c_app_config
    <set>
      <if test="appId != null">
        app_id = #{appId,jdbcType=VARCHAR},
      </if>
      <if test="secretKey != null">
        secret_key = #{secretKey,jdbcType=VARCHAR},
      </if>
      <if test="appType != null">
        app_type = #{appType,jdbcType=INTEGER},
      </if>
      <if test="busName != null">
        bus_name = #{busName,jdbcType=VARCHAR},
      </if>
      <if test="busSysName != null">
        bus_sys_name = #{busSysName,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,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>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.tdCAppConfig">
    update td_c_app_config
    set app_id = #{appId,jdbcType=VARCHAR},
      secret_key = #{secretKey,jdbcType=VARCHAR},
      app_type = #{appType,jdbcType=INTEGER},
      bus_name = #{busName,jdbcType=VARCHAR},
      bus_sys_name = #{busSysName,jdbcType=VARCHAR},
      remark = #{remark,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}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>