<?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.chaozhanggui.dao.system.dao.TbPlussAccessChannelCipherCodeMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussAccessChannelCipherCode">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="orgId" jdbcType="VARCHAR" property="orgid" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.dao.system.entity.TbPlussAccessChannelCipherCodeWithBLOBs">
    <result column="priKey" jdbcType="LONGVARCHAR" property="prikey" />
    <result column="pubKey" jdbcType="LONGVARCHAR" property="pubkey" />
  </resultMap>
  <sql id="Base_Column_List">
    id, orgId, createTime
  </sql>
  <sql id="Blob_Column_List">
    priKey, pubKey
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_pluss_access_channel_cipher_code
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_access_channel_cipher_code
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAccessChannelCipherCodeWithBLOBs">
    insert into tb_pluss_access_channel_cipher_code (id, orgId, createTime, 
      priKey, pubKey)
    values (#{id,jdbcType=INTEGER}, #{orgid,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, 
      #{prikey,jdbcType=LONGVARCHAR}, #{pubkey,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAccessChannelCipherCodeWithBLOBs">
    insert into tb_pluss_access_channel_cipher_code
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="orgid != null">
        orgId,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="prikey != null">
        priKey,
      </if>
      <if test="pubkey != null">
        pubKey,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="orgid != null">
        #{orgid,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="prikey != null">
        #{prikey,jdbcType=LONGVARCHAR},
      </if>
      <if test="pubkey != null">
        #{pubkey,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAccessChannelCipherCodeWithBLOBs">
    update tb_pluss_access_channel_cipher_code
    <set>
      <if test="orgid != null">
        orgId = #{orgid,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="prikey != null">
        priKey = #{prikey,jdbcType=LONGVARCHAR},
      </if>
      <if test="pubkey != null">
        pubKey = #{pubkey,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAccessChannelCipherCodeWithBLOBs">
    update tb_pluss_access_channel_cipher_code
    set orgId = #{orgid,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      priKey = #{prikey,jdbcType=LONGVARCHAR},
      pubKey = #{pubkey,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAccessChannelCipherCode">
    update tb_pluss_access_channel_cipher_code
    set orgId = #{orgid,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>