<?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="org.linlinjava.litemall.db.dao.LitemallAdMapper">
  <resultMap id="BaseResultMap" type="org.linlinjava.litemall.db.domain.LitemallAd">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="link" jdbcType="VARCHAR" property="link" />
    <result column="url" jdbcType="VARCHAR" property="url" />
    <result column="position" jdbcType="TINYINT" property="position" />
    <result column="content" jdbcType="VARCHAR" property="content" />
    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
    <result column="enabled" jdbcType="BIT" property="enabled" />
    <result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
    <result column="deleted" jdbcType="BIT" property="deleted" />
    <result column="version" jdbcType="INTEGER" property="version" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach close=")" collection="example.oredCriteria" item="criteria" open="and (" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_With_Version_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    <where>
      version = #{version,jdbcType=INTEGER}
      <if test="example.oredCriteria.size() &gt; 0">
        <foreach close=")" collection="example.oredCriteria" item="criteria" open="and (" separator="or">
          <if test="criteria.valid">
            <trim prefix="(" prefixOverrides="and" suffix=")">
              <foreach collection="criteria.criteria" item="criterion">
                <choose>
                  <when test="criterion.noValue">
                    and ${criterion.condition}
                  </when>
                  <when test="criterion.singleValue">
                    and ${criterion.condition} #{criterion.value}
                  </when>
                  <when test="criterion.betweenValue">
                    and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                  </when>
                  <when test="criterion.listValue">
                    and ${criterion.condition}
                    <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                      #{listItem}
                    </foreach>
                  </when>
                </choose>
              </foreach>
            </trim>
          </if>
        </foreach>
      </if>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, `name`, link, url, `position`, content, start_time, end_time, enabled, add_time, 
    deleted, version
  </sql>
  <select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallAdExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from litemall_ad
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <if test="example.distinct">
      distinct
    </if>
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.escapedColumnName}
        </foreach>
      </when>
      <otherwise>
        id, `name`, link, url, `position`, content, start_time, end_time, enabled, add_time, 
          deleted, version
      </otherwise>
    </choose>
    from litemall_ad
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
    <if test="example.orderByClause != null">
      order by ${example.orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from litemall_ad
    where id = #{id,jdbcType=INTEGER}
  </select>
  <select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from litemall_ad
    where id = #{id,jdbcType=INTEGER}
      and deleted = 
    <choose>
      <when test="andLogicalDeleted">
        '1'
      </when>
      <otherwise>
        '0'
      </otherwise>
    </choose>
  </select>
  <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.escapedColumnName}
        </foreach>
      </when>
      <otherwise>
        id, `name`, link, url, `position`, content, start_time, end_time, enabled, add_time, 
          deleted, version
      </otherwise>
    </choose>
    from litemall_ad
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from litemall_ad
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallAdExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from litemall_ad
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="org.linlinjava.litemall.db.domain.LitemallAd">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into litemall_ad (`name`, link, url, 
      `position`, content, start_time, 
      end_time, enabled, add_time, 
      deleted, version)
    values (#{name,jdbcType=VARCHAR}, #{link,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, 
      #{position,jdbcType=TINYINT}, #{content,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, 
      #{endTime,jdbcType=TIMESTAMP}, #{enabled,jdbcType=BIT}, #{addTime,jdbcType=TIMESTAMP}, 
      #{deleted,jdbcType=BIT}, #{version,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallAd">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into litemall_ad
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="name != null">
        `name`,
      </if>
      <if test="link != null">
        link,
      </if>
      <if test="url != null">
        url,
      </if>
      <if test="position != null">
        `position`,
      </if>
      <if test="content != null">
        content,
      </if>
      <if test="startTime != null">
        start_time,
      </if>
      <if test="endTime != null">
        end_time,
      </if>
      <if test="enabled != null">
        enabled,
      </if>
      <if test="addTime != null">
        add_time,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
      <if test="version != null">
        version,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="link != null">
        #{link,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        #{url,jdbcType=VARCHAR},
      </if>
      <if test="position != null">
        #{position,jdbcType=TINYINT},
      </if>
      <if test="content != null">
        #{content,jdbcType=VARCHAR},
      </if>
      <if test="startTime != null">
        #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="enabled != null">
        #{enabled,jdbcType=BIT},
      </if>
      <if test="addTime != null">
        #{addTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=BIT},
      </if>
      <if test="version != null">
        #{version,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallAdExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from litemall_ad
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update litemall_ad
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.name != null">
        `name` = #{record.name,jdbcType=VARCHAR},
      </if>
      <if test="record.link != null">
        link = #{record.link,jdbcType=VARCHAR},
      </if>
      <if test="record.url != null">
        url = #{record.url,jdbcType=VARCHAR},
      </if>
      <if test="record.position != null">
        `position` = #{record.position,jdbcType=TINYINT},
      </if>
      <if test="record.content != null">
        content = #{record.content,jdbcType=VARCHAR},
      </if>
      <if test="record.startTime != null">
        start_time = #{record.startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.endTime != null">
        end_time = #{record.endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.enabled != null">
        enabled = #{record.enabled,jdbcType=BIT},
      </if>
      <if test="record.addTime != null">
        add_time = #{record.addTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.deleted != null">
        deleted = #{record.deleted,jdbcType=BIT},
      </if>
      <if test="record.version != null">
        version = #{record.version,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update litemall_ad
    set id = #{record.id,jdbcType=INTEGER},
      `name` = #{record.name,jdbcType=VARCHAR},
      link = #{record.link,jdbcType=VARCHAR},
      url = #{record.url,jdbcType=VARCHAR},
      `position` = #{record.position,jdbcType=TINYINT},
      content = #{record.content,jdbcType=VARCHAR},
      start_time = #{record.startTime,jdbcType=TIMESTAMP},
      end_time = #{record.endTime,jdbcType=TIMESTAMP},
      enabled = #{record.enabled,jdbcType=BIT},
      add_time = #{record.addTime,jdbcType=TIMESTAMP},
      deleted = #{record.deleted,jdbcType=BIT},
      version = #{record.version,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="org.linlinjava.litemall.db.domain.LitemallAd">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update litemall_ad
    <set>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="link != null">
        link = #{link,jdbcType=VARCHAR},
      </if>
      <if test="url != null">
        url = #{url,jdbcType=VARCHAR},
      </if>
      <if test="position != null">
        `position` = #{position,jdbcType=TINYINT},
      </if>
      <if test="content != null">
        content = #{content,jdbcType=VARCHAR},
      </if>
      <if test="startTime != null">
        start_time = #{startTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null">
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="enabled != null">
        enabled = #{enabled,jdbcType=BIT},
      </if>
      <if test="addTime != null">
        add_time = #{addTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=BIT},
      </if>
      <if test="version != null">
        version = #{version,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="org.linlinjava.litemall.db.domain.LitemallAd">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update litemall_ad
    set `name` = #{name,jdbcType=VARCHAR},
      link = #{link,jdbcType=VARCHAR},
      url = #{url,jdbcType=VARCHAR},
      `position` = #{position,jdbcType=TINYINT},
      content = #{content,jdbcType=VARCHAR},
      start_time = #{startTime,jdbcType=TIMESTAMP},
      end_time = #{endTime,jdbcType=TIMESTAMP},
      enabled = #{enabled,jdbcType=BIT},
      add_time = #{addTime,jdbcType=TIMESTAMP},
      deleted = #{deleted,jdbcType=BIT},
      version = #{version,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <select id="selectOneByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallAdExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <include refid="Base_Column_List" />
    from litemall_ad
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    limit 1
  </select>
  <select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    select
    <choose>
      <when test="selective != null and selective.length &gt; 0">
        <foreach collection="selective" item="column" separator=",">
          ${column.escapedColumnName}
        </foreach>
      </when>
      <otherwise>
        id, `name`, link, url, `position`, content, start_time, end_time, enabled, add_time, 
          deleted, version
      </otherwise>
    </choose>
    from litemall_ad
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
    <if test="example.orderByClause != null">
      order by ${example.orderByClause}
    </if>
    limit 1
  </select>
  <update id="logicalDeleteByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    update litemall_ad set deleted = 1
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    update litemall_ad set deleted = 1
    where id = #{id,jdbcType=INTEGER}
  </update>
  <delete id="deleteWithVersionByPrimaryKey" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    delete from litemall_ad
    where version = #{version,jdbcType=INTEGER}
      and id = #{key,jdbcType=INTEGER}
  </delete>
  <delete id="deleteWithVersionByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    delete from litemall_ad
    <if test="_parameter != null">
      <include refid="Update_By_Example_With_Version_Where_Clause" />
    </if>
  </delete>
  <update id="updateWithVersionByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    update litemall_ad
    set version = version + 1,
    id = #{record.id,jdbcType=INTEGER}, 
    `name` = #{record.name,jdbcType=VARCHAR}, 
    link = #{record.link,jdbcType=VARCHAR}, 
    url = #{record.url,jdbcType=VARCHAR}, 
    `position` = #{record.position,jdbcType=TINYINT}, 
    content = #{record.content,jdbcType=VARCHAR}, 
    start_time = #{record.startTime,jdbcType=TIMESTAMP}, 
    end_time = #{record.endTime,jdbcType=TIMESTAMP}, 
    enabled = #{record.enabled,jdbcType=BIT}, 
    add_time = #{record.addTime,jdbcType=TIMESTAMP}, 
    deleted = #{record.deleted,jdbcType=BIT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_With_Version_Where_Clause" />
    </if>
  </update>
  <update id="updateWithVersionByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    update litemall_ad
    <set>
      <trim suffixOverrides=",">
        version = version + 1,
        <if test="record.id != null">
          id = #{record.id,jdbcType=INTEGER},
        </if>
        <if test="record.name != null">
          `name` = #{record.name,jdbcType=VARCHAR},
        </if>
        <if test="record.link != null">
          link = #{record.link,jdbcType=VARCHAR},
        </if>
        <if test="record.url != null">
          url = #{record.url,jdbcType=VARCHAR},
        </if>
        <if test="record.position != null">
          `position` = #{record.position,jdbcType=TINYINT},
        </if>
        <if test="record.content != null">
          content = #{record.content,jdbcType=VARCHAR},
        </if>
        <if test="record.startTime != null">
          start_time = #{record.startTime,jdbcType=TIMESTAMP},
        </if>
        <if test="record.endTime != null">
          end_time = #{record.endTime,jdbcType=TIMESTAMP},
        </if>
        <if test="record.enabled != null">
          enabled = #{record.enabled,jdbcType=BIT},
        </if>
        <if test="record.addTime != null">
          add_time = #{record.addTime,jdbcType=TIMESTAMP},
        </if>
        <if test="record.deleted != null">
          deleted = #{record.deleted,jdbcType=BIT},
        </if>
      </trim>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_With_Version_Where_Clause" />
    </if>
  </update>
  <update id="updateWithVersionByPrimaryKey" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    update litemall_ad
    set version = version + 1,
    `name` = #{record.name,jdbcType=VARCHAR}, 
    link = #{record.link,jdbcType=VARCHAR}, 
    url = #{record.url,jdbcType=VARCHAR}, 
    `position` = #{record.position,jdbcType=TINYINT}, 
    content = #{record.content,jdbcType=VARCHAR}, 
    start_time = #{record.startTime,jdbcType=TIMESTAMP}, 
    end_time = #{record.endTime,jdbcType=TIMESTAMP}, 
    enabled = #{record.enabled,jdbcType=BIT}, 
    add_time = #{record.addTime,jdbcType=TIMESTAMP}, 
    deleted = #{record.deleted,jdbcType=BIT}
    where version = #{version,jdbcType=INTEGER}
      and id = #{record.id,jdbcType=INTEGER}
  </update>
  <update id="updateWithVersionByPrimaryKeySelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
      @project https://github.com/itfsw/mybatis-generator-plugin
    -->
    update litemall_ad
    <set>
      <trim suffixOverrides=",">
        version = version + 1,
        <if test="record.name != null">
          `name` = #{record.name,jdbcType=VARCHAR},
        </if>
        <if test="record.link != null">
          link = #{record.link,jdbcType=VARCHAR},
        </if>
        <if test="record.url != null">
          url = #{record.url,jdbcType=VARCHAR},
        </if>
        <if test="record.position != null">
          `position` = #{record.position,jdbcType=TINYINT},
        </if>
        <if test="record.content != null">
          content = #{record.content,jdbcType=VARCHAR},
        </if>
        <if test="record.startTime != null">
          start_time = #{record.startTime,jdbcType=TIMESTAMP},
        </if>
        <if test="record.endTime != null">
          end_time = #{record.endTime,jdbcType=TIMESTAMP},
        </if>
        <if test="record.enabled != null">
          enabled = #{record.enabled,jdbcType=BIT},
        </if>
        <if test="record.addTime != null">
          add_time = #{record.addTime,jdbcType=TIMESTAMP},
        </if>
        <if test="record.deleted != null">
          deleted = #{record.deleted,jdbcType=BIT},
        </if>
      </trim>
    </set>
    where version = #{version,jdbcType=INTEGER}
      and id = #{record.id,jdbcType=INTEGER}
  </update>
</mapper>