<?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.dao.OperationLogUserMapper">
  <resultMap id="BaseResultMap" type="pwc.taxtech.atms.entity.OperationLogUser">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="operation_content" jdbcType="VARCHAR" property="operationContent" />
    <result column="module_name" jdbcType="VARCHAR" property="moduleName" />
    <result column="operation_object" jdbcType="VARCHAR" property="operationObject" />
    <result column="operation_action" jdbcType="VARCHAR" property="operationAction" />
    <result column="original_state" jdbcType="VARCHAR" property="originalState" />
    <result column="update_state" jdbcType="VARCHAR" property="updateState" />
    <result column="operation_user" jdbcType="VARCHAR" property="operationUser" />
    <result column="ip" jdbcType="VARCHAR" property="ip" />
    <result column="comment" jdbcType="VARCHAR" property="comment" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  </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, operation_content, module_name, operation_object, operation_action, original_state, 
    update_state, operation_user, ip, comment, create_time
  </sql>
  <select id="selectByExample" parameterType="pwc.taxtech.atms.entity.OperationLogUserExample" 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 operation_log_user
    <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 operation_log_user
    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 operation_log_user
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="pwc.taxtech.atms.entity.OperationLogUserExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from operation_log_user
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="pwc.taxtech.atms.entity.OperationLogUser">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into operation_log_user (id, operation_content, module_name, 
      operation_object, operation_action, original_state, 
      update_state, operation_user, ip, 
      comment, create_time)
    values (#{id,jdbcType=VARCHAR}, #{operationContent,jdbcType=VARCHAR}, #{moduleName,jdbcType=VARCHAR}, 
      #{operationObject,jdbcType=VARCHAR}, #{operationAction,jdbcType=VARCHAR}, #{originalState,jdbcType=VARCHAR}, 
      #{updateState,jdbcType=VARCHAR}, #{operationUser,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, 
      #{comment,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="pwc.taxtech.atms.entity.OperationLogUser">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into operation_log_user
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="operationContent != null">
        operation_content,
      </if>
      <if test="moduleName != null">
        module_name,
      </if>
      <if test="operationObject != null">
        operation_object,
      </if>
      <if test="operationAction != null">
        operation_action,
      </if>
      <if test="originalState != null">
        original_state,
      </if>
      <if test="updateState != null">
        update_state,
      </if>
      <if test="operationUser != null">
        operation_user,
      </if>
      <if test="ip != null">
        ip,
      </if>
      <if test="comment != null">
        comment,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="operationContent != null">
        #{operationContent,jdbcType=VARCHAR},
      </if>
      <if test="moduleName != null">
        #{moduleName,jdbcType=VARCHAR},
      </if>
      <if test="operationObject != null">
        #{operationObject,jdbcType=VARCHAR},
      </if>
      <if test="operationAction != null">
        #{operationAction,jdbcType=VARCHAR},
      </if>
      <if test="originalState != null">
        #{originalState,jdbcType=VARCHAR},
      </if>
      <if test="updateState != null">
        #{updateState,jdbcType=VARCHAR},
      </if>
      <if test="operationUser != null">
        #{operationUser,jdbcType=VARCHAR},
      </if>
      <if test="ip != null">
        #{ip,jdbcType=VARCHAR},
      </if>
      <if test="comment != null">
        #{comment,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="pwc.taxtech.atms.entity.OperationLogUserExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from operation_log_user
    <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 operation_log_user
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.operationContent != null">
        operation_content = #{record.operationContent,jdbcType=VARCHAR},
      </if>
      <if test="record.moduleName != null">
        module_name = #{record.moduleName,jdbcType=VARCHAR},
      </if>
      <if test="record.operationObject != null">
        operation_object = #{record.operationObject,jdbcType=VARCHAR},
      </if>
      <if test="record.operationAction != null">
        operation_action = #{record.operationAction,jdbcType=VARCHAR},
      </if>
      <if test="record.originalState != null">
        original_state = #{record.originalState,jdbcType=VARCHAR},
      </if>
      <if test="record.updateState != null">
        update_state = #{record.updateState,jdbcType=VARCHAR},
      </if>
      <if test="record.operationUser != null">
        operation_user = #{record.operationUser,jdbcType=VARCHAR},
      </if>
      <if test="record.ip != null">
        ip = #{record.ip,jdbcType=VARCHAR},
      </if>
      <if test="record.comment != null">
        comment = #{record.comment,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </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 operation_log_user
    set id = #{record.id,jdbcType=VARCHAR},
      operation_content = #{record.operationContent,jdbcType=VARCHAR},
      module_name = #{record.moduleName,jdbcType=VARCHAR},
      operation_object = #{record.operationObject,jdbcType=VARCHAR},
      operation_action = #{record.operationAction,jdbcType=VARCHAR},
      original_state = #{record.originalState,jdbcType=VARCHAR},
      update_state = #{record.updateState,jdbcType=VARCHAR},
      operation_user = #{record.operationUser,jdbcType=VARCHAR},
      ip = #{record.ip,jdbcType=VARCHAR},
      comment = #{record.comment,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="pwc.taxtech.atms.entity.OperationLogUser">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update operation_log_user
    <set>
      <if test="operationContent != null">
        operation_content = #{operationContent,jdbcType=VARCHAR},
      </if>
      <if test="moduleName != null">
        module_name = #{moduleName,jdbcType=VARCHAR},
      </if>
      <if test="operationObject != null">
        operation_object = #{operationObject,jdbcType=VARCHAR},
      </if>
      <if test="operationAction != null">
        operation_action = #{operationAction,jdbcType=VARCHAR},
      </if>
      <if test="originalState != null">
        original_state = #{originalState,jdbcType=VARCHAR},
      </if>
      <if test="updateState != null">
        update_state = #{updateState,jdbcType=VARCHAR},
      </if>
      <if test="operationUser != null">
        operation_user = #{operationUser,jdbcType=VARCHAR},
      </if>
      <if test="ip != null">
        ip = #{ip,jdbcType=VARCHAR},
      </if>
      <if test="comment != null">
        comment = #{comment,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="pwc.taxtech.atms.entity.OperationLogUser">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update operation_log_user
    set operation_content = #{operationContent,jdbcType=VARCHAR},
      module_name = #{moduleName,jdbcType=VARCHAR},
      operation_object = #{operationObject,jdbcType=VARCHAR},
      operation_action = #{operationAction,jdbcType=VARCHAR},
      original_state = #{originalState,jdbcType=VARCHAR},
      update_state = #{updateState,jdbcType=VARCHAR},
      operation_user = #{operationUser,jdbcType=VARCHAR},
      ip = #{ip,jdbcType=VARCHAR},
      comment = #{comment,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <select id="selectByExampleWithRowbounds" parameterType="pwc.taxtech.atms.entity.OperationLogUserExample" 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 operation_log_user
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
</mapper>