<?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.fuxi.ws.data.dao.SysLogMapper" >
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.SysLog" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Apr 30 17:07:26 CST 2015.
    -->
    <result column="aID" property="aid" jdbcType="BIGINT" />
    <result column="Computer" property="computer" jdbcType="VARCHAR" />
    <result column="UserNo" property="userno" jdbcType="VARCHAR" />
    <result column="UserName" property="username" jdbcType="VARCHAR" />
    <result column="Time" property="time" jdbcType="TIMESTAMP" />
    <result column="ModelName" property="modelname" jdbcType="VARCHAR" />
    <result column="Operate" property="operate" jdbcType="VARCHAR" />
    <result column="Memo" property="memo" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Apr 30 17:07:26 CST 2015.
    -->
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Apr 30 17:07:26 CST 2015.
    -->
    aID, Computer, UserNo, UserName, Time, ModelName, Operate, Memo
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.fuxi.ws.data.entity.SysLogExample" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Apr 30 17:07:26 CST 2015.
    -->
    select
    <if test="distinct" >
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from sys_Log
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.SysLog" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Apr 30 17:07:26 CST 2015.
    -->
    insert into sys_Log (aID, Computer, UserNo, 
      UserName, Time, ModelName, 
      Operate, Memo)
    values (#{aid,jdbcType=BIGINT}, #{computer,jdbcType=VARCHAR}, #{userno,jdbcType=VARCHAR}, 
      #{username,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP}, #{modelname,jdbcType=VARCHAR}, 
      #{operate,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.SysLog" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Apr 30 17:07:26 CST 2015.
    -->
    insert into sys_Log
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="aid != null" >
        aID,
      </if>
      <if test="computer != null" >
        Computer,
      </if>
      <if test="userno != null" >
        UserNo,
      </if>
      <if test="username != null" >
        UserName,
      </if>
      <if test="time != null" >
        Time,
      </if>
      <if test="modelname != null" >
        ModelName,
      </if>
      <if test="operate != null" >
        Operate,
      </if>
      <if test="memo != null" >
        Memo,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="aid != null" >
        #{aid,jdbcType=BIGINT},
      </if>
      <if test="computer != null" >
        #{computer,jdbcType=VARCHAR},
      </if>
      <if test="userno != null" >
        #{userno,jdbcType=VARCHAR},
      </if>
      <if test="username != null" >
        #{username,jdbcType=VARCHAR},
      </if>
      <if test="time != null" >
        #{time,jdbcType=TIMESTAMP},
      </if>
      <if test="modelname != null" >
        #{modelname,jdbcType=VARCHAR},
      </if>
      <if test="operate != null" >
        #{operate,jdbcType=VARCHAR},
      </if>
      <if test="memo != null" >
        #{memo,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.SysLogExample" resultType="java.lang.Integer" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Apr 30 17:07:26 CST 2015.
    -->
    select count(*) from sys_Log
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
</mapper>