<?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="pwc.taxtech.atms.vat.dao.VatOperationLogMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.vat.entity.VatOperationLog">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="ID" />
    <result column="OperationName" jdbcType="VARCHAR" property="operationName" />
    <result column="ModuleID" jdbcType="INTEGER" property="moduleID" />
    <result column="OperationObject" jdbcType="VARCHAR" property="operationObject" />
    <result column="OperationType" jdbcType="INTEGER" property="operationType" />
    <result column="OperationContent" jdbcType="VARCHAR" property="operationContent" />
    <result column="OriginalState" jdbcType="VARCHAR" property="originalState" />
    <result column="UpdateState" jdbcType="VARCHAR" property="updateState" />
    <result column="CreatorID" jdbcType="VARCHAR" property="creatorID" />
    <result column="Comment" jdbcType="VARCHAR" property="comment" />
    <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UpdateTime" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="IP" jdbcType="VARCHAR" property="IP" />
    <result column="Period" jdbcType="INTEGER" property="period" />
    <result column="ServiceType" jdbcType="INTEGER" property="serviceType" />
  </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 collection="example.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="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    ID, OperationName, ModuleID, OperationObject, OperationType, OperationContent, OriginalState, 
    UpdateState, CreatorID, `Comment`, CreateTime, UpdateTime, IP, Period, ServiceType
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.vat.entity.VatOperationLogExample" 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 OperationLog
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from OperationLog
    where ID = #{ID,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from OperationLog
    where ID = #{ID,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.vat.entity.VatOperationLogExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from OperationLog
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.vat.entity.VatOperationLog">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into OperationLog (ID, OperationName, ModuleID, 
      OperationObject, OperationType, OperationContent, 
      OriginalState, UpdateState, CreatorID, 
      `Comment`, CreateTime, UpdateTime, 
      IP, Period, ServiceType
      )
    values (#{ID,jdbcType=VARCHAR}, #{operationName,jdbcType=VARCHAR}, #{moduleID,jdbcType=INTEGER}, 
      #{operationObject,jdbcType=VARCHAR}, #{operationType,jdbcType=INTEGER}, #{operationContent,jdbcType=VARCHAR}, 
      #{originalState,jdbcType=VARCHAR}, #{updateState,jdbcType=VARCHAR}, #{creatorID,jdbcType=VARCHAR}, 
      #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{IP,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}, #{serviceType,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.vat.entity.VatOperationLog">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into OperationLog
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="ID != null">
        ID,
      </if>
      <if test="operationName != null">
        OperationName,
      </if>
      <if test="moduleID != null">
        ModuleID,
      </if>
      <if test="operationObject != null">
        OperationObject,
      </if>
      <if test="operationType != null">
        OperationType,
      </if>
      <if test="operationContent != null">
        OperationContent,
      </if>
      <if test="originalState != null">
        OriginalState,
      </if>
      <if test="updateState != null">
        UpdateState,
      </if>
      <if test="creatorID != null">
        CreatorID,
      </if>
      <if test="comment != null">
        `Comment`,
      </if>
      <if test="createTime != null">
        CreateTime,
      </if>
      <if test="updateTime != null">
        UpdateTime,
      </if>
      <if test="IP != null">
        IP,
      </if>
      <if test="period != null">
        Period,
      </if>
      <if test="serviceType != null">
        ServiceType,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="ID != null">
        #{ID,jdbcType=VARCHAR},
      </if>
      <if test="operationName != null">
        #{operationName,jdbcType=VARCHAR},
      </if>
      <if test="moduleID != null">
        #{moduleID,jdbcType=INTEGER},
      </if>
      <if test="operationObject != null">
        #{operationObject,jdbcType=VARCHAR},
      </if>
      <if test="operationType != null">
        #{operationType,jdbcType=INTEGER},
      </if>
      <if test="operationContent != null">
        #{operationContent,jdbcType=VARCHAR},
      </if>
      <if test="originalState != null">
        #{originalState,jdbcType=VARCHAR},
      </if>
      <if test="updateState != null">
        #{updateState,jdbcType=VARCHAR},
      </if>
      <if test="creatorID != null">
        #{creatorID,jdbcType=VARCHAR},
      </if>
      <if test="comment != null">
        #{comment,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="IP != null">
        #{IP,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
        #{period,jdbcType=INTEGER},
      </if>
      <if test="serviceType != null">
        #{serviceType,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.vat.entity.VatOperationLogExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from OperationLog
    <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 OperationLog
    <set>
      <if test="record.ID != null">
        ID = #{record.ID,jdbcType=VARCHAR},
      </if>
      <if test="record.operationName != null">
        OperationName = #{record.operationName,jdbcType=VARCHAR},
      </if>
      <if test="record.moduleID != null">
        ModuleID = #{record.moduleID,jdbcType=INTEGER},
      </if>
      <if test="record.operationObject != null">
        OperationObject = #{record.operationObject,jdbcType=VARCHAR},
      </if>
      <if test="record.operationType != null">
        OperationType = #{record.operationType,jdbcType=INTEGER},
      </if>
      <if test="record.operationContent != null">
        OperationContent = #{record.operationContent,jdbcType=VARCHAR},
      </if>
      <if test="record.originalState != null">
        OriginalState = #{record.originalState,jdbcType=VARCHAR},
      </if>
      <if test="record.updateState != null">
        UpdateState = #{record.updateState,jdbcType=VARCHAR},
      </if>
      <if test="record.creatorID != null">
        CreatorID = #{record.creatorID,jdbcType=VARCHAR},
      </if>
      <if test="record.comment != null">
        `Comment` = #{record.comment,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        CreateTime = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateTime != null">
        UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.IP != null">
        IP = #{record.IP,jdbcType=VARCHAR},
      </if>
      <if test="record.period != null">
        Period = #{record.period,jdbcType=INTEGER},
      </if>
      <if test="record.serviceType != null">
        ServiceType = #{record.serviceType,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 OperationLog
    set ID = #{record.ID,jdbcType=VARCHAR},
      OperationName = #{record.operationName,jdbcType=VARCHAR},
      ModuleID = #{record.moduleID,jdbcType=INTEGER},
      OperationObject = #{record.operationObject,jdbcType=VARCHAR},
      OperationType = #{record.operationType,jdbcType=INTEGER},
      OperationContent = #{record.operationContent,jdbcType=VARCHAR},
      OriginalState = #{record.originalState,jdbcType=VARCHAR},
      UpdateState = #{record.updateState,jdbcType=VARCHAR},
      CreatorID = #{record.creatorID,jdbcType=VARCHAR},
      `Comment` = #{record.comment,jdbcType=VARCHAR},
      CreateTime = #{record.createTime,jdbcType=TIMESTAMP},
      UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP},
      IP = #{record.IP,jdbcType=VARCHAR},
      Period = #{record.period,jdbcType=INTEGER},
      ServiceType = #{record.serviceType,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.vat.entity.VatOperationLog">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update OperationLog
    <set>
      <if test="operationName != null">
        OperationName = #{operationName,jdbcType=VARCHAR},
      </if>
      <if test="moduleID != null">
        ModuleID = #{moduleID,jdbcType=INTEGER},
      </if>
      <if test="operationObject != null">
        OperationObject = #{operationObject,jdbcType=VARCHAR},
      </if>
      <if test="operationType != null">
        OperationType = #{operationType,jdbcType=INTEGER},
      </if>
      <if test="operationContent != null">
        OperationContent = #{operationContent,jdbcType=VARCHAR},
      </if>
      <if test="originalState != null">
        OriginalState = #{originalState,jdbcType=VARCHAR},
      </if>
      <if test="updateState != null">
        UpdateState = #{updateState,jdbcType=VARCHAR},
      </if>
      <if test="creatorID != null">
        CreatorID = #{creatorID,jdbcType=VARCHAR},
      </if>
      <if test="comment != null">
        `Comment` = #{comment,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        CreateTime = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        UpdateTime = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="IP != null">
        IP = #{IP,jdbcType=VARCHAR},
      </if>
      <if test="period != null">
        Period = #{period,jdbcType=INTEGER},
      </if>
      <if test="serviceType != null">
        ServiceType = #{serviceType,jdbcType=INTEGER},
      </if>
    </set>
    where ID = #{ID,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.vat.entity.VatOperationLog">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update OperationLog
    set OperationName = #{operationName,jdbcType=VARCHAR},
      ModuleID = #{moduleID,jdbcType=INTEGER},
      OperationObject = #{operationObject,jdbcType=VARCHAR},
      OperationType = #{operationType,jdbcType=INTEGER},
      OperationContent = #{operationContent,jdbcType=VARCHAR},
      OriginalState = #{originalState,jdbcType=VARCHAR},
      UpdateState = #{updateState,jdbcType=VARCHAR},
      CreatorID = #{creatorID,jdbcType=VARCHAR},
      `Comment` = #{comment,jdbcType=VARCHAR},
      CreateTime = #{createTime,jdbcType=TIMESTAMP},
      UpdateTime = #{updateTime,jdbcType=TIMESTAMP},
      IP = #{IP,jdbcType=VARCHAR},
      Period = #{period,jdbcType=INTEGER},
      ServiceType = #{serviceType,jdbcType=INTEGER}
    where ID = #{ID,jdbcType=VARCHAR}
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.vat.entity.VatOperationLogExample" 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 OperationLog
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>