<?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.TbPlussActivityEnrollMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussActivityEnroll">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="merchantCode" jdbcType="VARCHAR" property="merchantcode" />
    <result column="merchantName" jdbcType="VARCHAR" property="merchantname" />
    <result column="actName" jdbcType="VARCHAR" property="actname" />
    <result column="actId" jdbcType="INTEGER" property="actid" />
    <result column="status" jdbcType="CHAR" property="status" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
    <result column="auditTime" jdbcType="TIMESTAMP" property="audittime" />
    <result column="actType" jdbcType="CHAR" property="acttype" />
    <result column="deviceNo" jdbcType="VARCHAR" property="deviceno" />
  </resultMap>
  <sql id="Base_Column_List">
    id, merchantCode, merchantName, actName, actId, status, remark, createTime, updateTime, 
    auditTime, actType, deviceNo
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_activity_enroll
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_activity_enroll
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussActivityEnroll">
    insert into tb_pluss_activity_enroll (id, merchantCode, merchantName, 
      actName, actId, status, 
      remark, createTime, updateTime, 
      auditTime, actType, deviceNo
      )
    values (#{id,jdbcType=INTEGER}, #{merchantcode,jdbcType=VARCHAR}, #{merchantname,jdbcType=VARCHAR}, 
      #{actname,jdbcType=VARCHAR}, #{actid,jdbcType=INTEGER}, #{status,jdbcType=CHAR}, 
      #{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}, 
      #{audittime,jdbcType=TIMESTAMP}, #{acttype,jdbcType=CHAR}, #{deviceno,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussActivityEnroll">
    insert into tb_pluss_activity_enroll
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="merchantcode != null">
        merchantCode,
      </if>
      <if test="merchantname != null">
        merchantName,
      </if>
      <if test="actname != null">
        actName,
      </if>
      <if test="actid != null">
        actId,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
      <if test="audittime != null">
        auditTime,
      </if>
      <if test="acttype != null">
        actType,
      </if>
      <if test="deviceno != null">
        deviceNo,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="merchantcode != null">
        #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="actname != null">
        #{actname,jdbcType=VARCHAR},
      </if>
      <if test="actid != null">
        #{actid,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        #{status,jdbcType=CHAR},
      </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="audittime != null">
        #{audittime,jdbcType=TIMESTAMP},
      </if>
      <if test="acttype != null">
        #{acttype,jdbcType=CHAR},
      </if>
      <if test="deviceno != null">
        #{deviceno,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussActivityEnroll">
    update tb_pluss_activity_enroll
    <set>
      <if test="merchantcode != null">
        merchantCode = #{merchantcode,jdbcType=VARCHAR},
      </if>
      <if test="merchantname != null">
        merchantName = #{merchantname,jdbcType=VARCHAR},
      </if>
      <if test="actname != null">
        actName = #{actname,jdbcType=VARCHAR},
      </if>
      <if test="actid != null">
        actId = #{actid,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=CHAR},
      </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="audittime != null">
        auditTime = #{audittime,jdbcType=TIMESTAMP},
      </if>
      <if test="acttype != null">
        actType = #{acttype,jdbcType=CHAR},
      </if>
      <if test="deviceno != null">
        deviceNo = #{deviceno,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussActivityEnroll">
    update tb_pluss_activity_enroll
    set merchantCode = #{merchantcode,jdbcType=VARCHAR},
      merchantName = #{merchantname,jdbcType=VARCHAR},
      actName = #{actname,jdbcType=VARCHAR},
      actId = #{actid,jdbcType=INTEGER},
      status = #{status,jdbcType=CHAR},
      remark = #{remark,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      updateTime = #{updatetime,jdbcType=TIMESTAMP},
      auditTime = #{audittime,jdbcType=TIMESTAMP},
      actType = #{acttype,jdbcType=CHAR},
      deviceNo = #{deviceno,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>