<?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.TbPlussAppletInfoMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussAppletInfo">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="appid" jdbcType="VARCHAR" property="appid" />
    <result column="ghId" jdbcType="VARCHAR" property="ghid" />
    <result column="secret" jdbcType="VARCHAR" property="secret" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, appid, ghId, secret, remark, createTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_applet_info
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_applet_info
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppletInfo">
    insert into tb_pluss_applet_info (id, appid, ghId, 
      secret, remark, createTime
      )
    values (#{id,jdbcType=INTEGER}, #{appid,jdbcType=VARCHAR}, #{ghid,jdbcType=VARCHAR}, 
      #{secret,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppletInfo">
    insert into tb_pluss_applet_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="appid != null">
        appid,
      </if>
      <if test="ghid != null">
        ghId,
      </if>
      <if test="secret != null">
        secret,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="appid != null">
        #{appid,jdbcType=VARCHAR},
      </if>
      <if test="ghid != null">
        #{ghid,jdbcType=VARCHAR},
      </if>
      <if test="secret != null">
        #{secret,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppletInfo">
    update tb_pluss_applet_info
    <set>
      <if test="appid != null">
        appid = #{appid,jdbcType=VARCHAR},
      </if>
      <if test="ghid != null">
        ghId = #{ghid,jdbcType=VARCHAR},
      </if>
      <if test="secret != null">
        secret = #{secret,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussAppletInfo">
    update tb_pluss_applet_info
    set appid = #{appid,jdbcType=VARCHAR},
      ghId = #{ghid,jdbcType=VARCHAR},
      secret = #{secret,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>