<?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.TbPlussMerchantPluginMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantPlugin">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="channel" jdbcType="INTEGER" property="channel" />
    <result column="userId" jdbcType="INTEGER" property="userid" />
    <result column="pluginId" jdbcType="VARCHAR" property="pluginid" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="thirdStatus" jdbcType="VARCHAR" property="thirdstatus" />
    <result column="applicationId" jdbcType="VARCHAR" property="applicationid" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
    <result column="posMerId" jdbcType="VARCHAR" property="posmerid" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.dao.system.entity.TbPlussMerchantPlugin">
    <result column="extra" jdbcType="LONGVARCHAR" property="extra" />
  </resultMap>
  <sql id="Base_Column_List">
    id, channel, userId, pluginId, status, thirdStatus, applicationId, remark, createTime, 
    updateTime, posMerId
  </sql>
  <sql id="Blob_Column_List">
    extra
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_pluss_merchant_plugin
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_merchant_plugin
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantPlugin">
    insert into tb_pluss_merchant_plugin (id, channel, userId, 
      pluginId, status, thirdStatus, 
      applicationId, remark, createTime, 
      updateTime, posMerId, extra
      )
    values (#{id,jdbcType=INTEGER}, #{channel,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, 
      #{pluginid,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{thirdstatus,jdbcType=VARCHAR}, 
      #{applicationid,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, 
      #{updatetime,jdbcType=TIMESTAMP}, #{posmerid,jdbcType=VARCHAR}, #{extra,jdbcType=LONGVARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantPlugin">
    insert into tb_pluss_merchant_plugin
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="channel != null">
        channel,
      </if>
      <if test="userid != null">
        userId,
      </if>
      <if test="pluginid != null">
        pluginId,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="thirdstatus != null">
        thirdStatus,
      </if>
      <if test="applicationid != null">
        applicationId,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
      <if test="posmerid != null">
        posMerId,
      </if>
      <if test="extra != null">
        extra,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="channel != null">
        #{channel,jdbcType=INTEGER},
      </if>
      <if test="userid != null">
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="pluginid != null">
        #{pluginid,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="thirdstatus != null">
        #{thirdstatus,jdbcType=VARCHAR},
      </if>
      <if test="applicationid != null">
        #{applicationid,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="posmerid != null">
        #{posmerid,jdbcType=VARCHAR},
      </if>
      <if test="extra != null">
        #{extra,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantPlugin">
    update tb_pluss_merchant_plugin
    <set>
      <if test="channel != null">
        channel = #{channel,jdbcType=INTEGER},
      </if>
      <if test="userid != null">
        userId = #{userid,jdbcType=INTEGER},
      </if>
      <if test="pluginid != null">
        pluginId = #{pluginid,jdbcType=VARCHAR},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="thirdstatus != null">
        thirdStatus = #{thirdstatus,jdbcType=VARCHAR},
      </if>
      <if test="applicationid != null">
        applicationId = #{applicationid,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        updateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="posmerid != null">
        posMerId = #{posmerid,jdbcType=VARCHAR},
      </if>
      <if test="extra != null">
        extra = #{extra,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantPlugin">
    update tb_pluss_merchant_plugin
    set channel = #{channel,jdbcType=INTEGER},
      userId = #{userid,jdbcType=INTEGER},
      pluginId = #{pluginid,jdbcType=VARCHAR},
      status = #{status,jdbcType=VARCHAR},
      thirdStatus = #{thirdstatus,jdbcType=VARCHAR},
      applicationId = #{applicationid,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      updateTime = #{updatetime,jdbcType=TIMESTAMP},
      posMerId = #{posmerid,jdbcType=VARCHAR},
      extra = #{extra,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantPlugin">
    update tb_pluss_merchant_plugin
    set channel = #{channel,jdbcType=INTEGER},
      userId = #{userid,jdbcType=INTEGER},
      pluginId = #{pluginid,jdbcType=VARCHAR},
      status = #{status,jdbcType=VARCHAR},
      thirdStatus = #{thirdstatus,jdbcType=VARCHAR},
      applicationId = #{applicationid,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      updateTime = #{updatetime,jdbcType=TIMESTAMP},
      posMerId = #{posmerid,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>