<?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.TbPlussOfficialActivityMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussOfficialActivity">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="officName" jdbcType="VARCHAR" property="officname" />
    <result column="officTitle" jdbcType="VARCHAR" property="offictitle" />
    <result column="officContent" jdbcType="VARCHAR" property="officcontent" />
    <result column="officImgUrl" jdbcType="VARCHAR" property="officimgurl" />
    <result column="toImgUrl" jdbcType="VARCHAR" property="toimgurl" />
    <result column="startTime" jdbcType="TIMESTAMP" property="starttime" />
    <result column="endTime" jdbcType="TIMESTAMP" property="endtime" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="createBy" jdbcType="VARCHAR" property="createby" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
    <result column="officDetailImgUrl" jdbcType="VARCHAR" property="officdetailimgurl" />
    <result column="activityGroupNo" jdbcType="VARCHAR" property="activitygroupno" />
    <result column="groupBy" jdbcType="VARCHAR" property="groupby" />
    <result column="actType" jdbcType="CHAR" property="acttype" />
    <result column="roleType" jdbcType="VARCHAR" property="roletype" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.dao.system.entity.TbPlussOfficialActivity">
    <result column="officRule" jdbcType="LONGVARCHAR" property="officrule" />
  </resultMap>
  <sql id="Base_Column_List">
    id, officName, officTitle, officContent, officImgUrl, toImgUrl, startTime, endTime, 
    status, remark, createTime, createBy, updateTime, officDetailImgUrl, activityGroupNo, 
    groupBy, actType, roleType
  </sql>
  <sql id="Blob_Column_List">
    officRule
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_pluss_official_activity
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_official_activity
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussOfficialActivity">
    insert into tb_pluss_official_activity (id, officName, officTitle, 
      officContent, officImgUrl, toImgUrl, 
      startTime, endTime, status, 
      remark, createTime, createBy, 
      updateTime, officDetailImgUrl, activityGroupNo, 
      groupBy, actType, roleType, 
      officRule)
    values (#{id,jdbcType=INTEGER}, #{officname,jdbcType=VARCHAR}, #{offictitle,jdbcType=VARCHAR}, 
      #{officcontent,jdbcType=VARCHAR}, #{officimgurl,jdbcType=VARCHAR}, #{toimgurl,jdbcType=VARCHAR}, 
      #{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{createby,jdbcType=VARCHAR}, 
      #{updatetime,jdbcType=TIMESTAMP}, #{officdetailimgurl,jdbcType=VARCHAR}, #{activitygroupno,jdbcType=VARCHAR}, 
      #{groupby,jdbcType=VARCHAR}, #{acttype,jdbcType=CHAR}, #{roletype,jdbcType=VARCHAR}, 
      #{officrule,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussOfficialActivity">
    insert into tb_pluss_official_activity
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="officname != null">
        officName,
      </if>
      <if test="offictitle != null">
        officTitle,
      </if>
      <if test="officcontent != null">
        officContent,
      </if>
      <if test="officimgurl != null">
        officImgUrl,
      </if>
      <if test="toimgurl != null">
        toImgUrl,
      </if>
      <if test="starttime != null">
        startTime,
      </if>
      <if test="endtime != null">
        endTime,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="createby != null">
        createBy,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
      <if test="officdetailimgurl != null">
        officDetailImgUrl,
      </if>
      <if test="activitygroupno != null">
        activityGroupNo,
      </if>
      <if test="groupby != null">
        groupBy,
      </if>
      <if test="acttype != null">
        actType,
      </if>
      <if test="roletype != null">
        roleType,
      </if>
      <if test="officrule != null">
        officRule,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="officname != null">
        #{officname,jdbcType=VARCHAR},
      </if>
      <if test="offictitle != null">
        #{offictitle,jdbcType=VARCHAR},
      </if>
      <if test="officcontent != null">
        #{officcontent,jdbcType=VARCHAR},
      </if>
      <if test="officimgurl != null">
        #{officimgurl,jdbcType=VARCHAR},
      </if>
      <if test="toimgurl != null">
        #{toimgurl,jdbcType=VARCHAR},
      </if>
      <if test="starttime != null">
        #{starttime,jdbcType=TIMESTAMP},
      </if>
      <if test="endtime != null">
        #{endtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="createby != null">
        #{createby,jdbcType=VARCHAR},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="officdetailimgurl != null">
        #{officdetailimgurl,jdbcType=VARCHAR},
      </if>
      <if test="activitygroupno != null">
        #{activitygroupno,jdbcType=VARCHAR},
      </if>
      <if test="groupby != null">
        #{groupby,jdbcType=VARCHAR},
      </if>
      <if test="acttype != null">
        #{acttype,jdbcType=CHAR},
      </if>
      <if test="roletype != null">
        #{roletype,jdbcType=VARCHAR},
      </if>
      <if test="officrule != null">
        #{officrule,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussOfficialActivity">
    update tb_pluss_official_activity
    <set>
      <if test="officname != null">
        officName = #{officname,jdbcType=VARCHAR},
      </if>
      <if test="offictitle != null">
        officTitle = #{offictitle,jdbcType=VARCHAR},
      </if>
      <if test="officcontent != null">
        officContent = #{officcontent,jdbcType=VARCHAR},
      </if>
      <if test="officimgurl != null">
        officImgUrl = #{officimgurl,jdbcType=VARCHAR},
      </if>
      <if test="toimgurl != null">
        toImgUrl = #{toimgurl,jdbcType=VARCHAR},
      </if>
      <if test="starttime != null">
        startTime = #{starttime,jdbcType=TIMESTAMP},
      </if>
      <if test="endtime != null">
        endTime = #{endtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="createby != null">
        createBy = #{createby,jdbcType=VARCHAR},
      </if>
      <if test="updatetime != null">
        updateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="officdetailimgurl != null">
        officDetailImgUrl = #{officdetailimgurl,jdbcType=VARCHAR},
      </if>
      <if test="activitygroupno != null">
        activityGroupNo = #{activitygroupno,jdbcType=VARCHAR},
      </if>
      <if test="groupby != null">
        groupBy = #{groupby,jdbcType=VARCHAR},
      </if>
      <if test="acttype != null">
        actType = #{acttype,jdbcType=CHAR},
      </if>
      <if test="roletype != null">
        roleType = #{roletype,jdbcType=VARCHAR},
      </if>
      <if test="officrule != null">
        officRule = #{officrule,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.dao.system.entity.TbPlussOfficialActivity">
    update tb_pluss_official_activity
    set officName = #{officname,jdbcType=VARCHAR},
      officTitle = #{offictitle,jdbcType=VARCHAR},
      officContent = #{officcontent,jdbcType=VARCHAR},
      officImgUrl = #{officimgurl,jdbcType=VARCHAR},
      toImgUrl = #{toimgurl,jdbcType=VARCHAR},
      startTime = #{starttime,jdbcType=TIMESTAMP},
      endTime = #{endtime,jdbcType=TIMESTAMP},
      status = #{status,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      createBy = #{createby,jdbcType=VARCHAR},
      updateTime = #{updatetime,jdbcType=TIMESTAMP},
      officDetailImgUrl = #{officdetailimgurl,jdbcType=VARCHAR},
      activityGroupNo = #{activitygroupno,jdbcType=VARCHAR},
      groupBy = #{groupby,jdbcType=VARCHAR},
      actType = #{acttype,jdbcType=CHAR},
      roleType = #{roletype,jdbcType=VARCHAR},
      officRule = #{officrule,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussOfficialActivity">
    update tb_pluss_official_activity
    set officName = #{officname,jdbcType=VARCHAR},
      officTitle = #{offictitle,jdbcType=VARCHAR},
      officContent = #{officcontent,jdbcType=VARCHAR},
      officImgUrl = #{officimgurl,jdbcType=VARCHAR},
      toImgUrl = #{toimgurl,jdbcType=VARCHAR},
      startTime = #{starttime,jdbcType=TIMESTAMP},
      endTime = #{endtime,jdbcType=TIMESTAMP},
      status = #{status,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      createBy = #{createby,jdbcType=VARCHAR},
      updateTime = #{updatetime,jdbcType=TIMESTAMP},
      officDetailImgUrl = #{officdetailimgurl,jdbcType=VARCHAR},
      activityGroupNo = #{activitygroupno,jdbcType=VARCHAR},
      groupBy = #{groupby,jdbcType=VARCHAR},
      actType = #{acttype,jdbcType=CHAR},
      roleType = #{roletype,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>