<?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.gyee.frame.mapper.auto.GyeeuserinformationMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Gyeeuserinformation">
    <result column="id" jdbcType="VARCHAR" property="id" />
    <result column="icon" jdbcType="VARCHAR" property="icon" />
    <result column="phonenum" jdbcType="VARCHAR" property="phonenum" />
    <result column="remarks1" jdbcType="VARCHAR" property="remarks1" />
    <result column="remarks2" jdbcType="VARCHAR" property="remarks2" />
    <result column="email" jdbcType="VARCHAR" property="email" />
    <result column="lastlogintime" jdbcType="VARCHAR" property="lastlogintime" />
    <result column="lastloginip" jdbcType="VARCHAR" property="lastloginip" />
    <result column="lastequipmenttype" jdbcType="VARCHAR" property="lastequipmenttype" />
    <result column="name" jdbcType="VARCHAR" property="name" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <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">
    <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">
	  	  	      	id,
       	  	      	icon,
       	  	      	phonenum,
       	  	      	remarks1,
       	  	      	remarks2,
       	  	      	email,
       	  	      	lastlogintime,
       	  	      	lastloginip,
       	  	      	lastequipmenttype,
       	  	    	  	name
       	</sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.GyeeuserinformationExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from gyeeuserinformation
    <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">
    select 
    <include refid="Base_Column_List" />
    from gyeeuserinformation
    where id = #{id,jdbcType=VARCHAR}
  </select>

  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from gyeeuserinformation
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.GyeeuserinformationExample">
    delete from gyeeuserinformation
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  
  <insert id="insert" parameterType="com.gyee.frame.model.auto.Gyeeuserinformation">
    insert into gyeeuserinformation (
      	  	       id,
       	  	       icon,
       	  	       phonenum,
       	  	       remarks1,
       	  	       remarks2,
       	  	       email,
       	  	       lastlogintime,
       	  	       lastloginip,
       	  	       lastequipmenttype,
       	  	    	  name
       	    )
    values (
	  	  	      	#{id,jdbcType=VARCHAR},
       	  	      	#{icon,jdbcType=VARCHAR},
       	  	      	#{phonenum,jdbcType=VARCHAR},
       	  	      	#{remarks1,jdbcType=VARCHAR},
       	  	      	#{remarks2,jdbcType=VARCHAR},
       	  	      	#{email,jdbcType=VARCHAR},
       	  	      	#{lastlogintime,jdbcType=VARCHAR},
       	  	      	#{lastloginip,jdbcType=VARCHAR},
       	  	      	#{lastequipmenttype,jdbcType=VARCHAR},
       	  	    	  #{name,jdbcType=VARCHAR}
       	    )
  </insert>
  
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Gyeeuserinformation">
    insert into gyeeuserinformation
    <trim prefix="(" suffix=")" suffixOverrides=",">
          
      <if test="id != null">
        id,
      </if>
      
         
      <if test="icon != null">
        icon,
      </if>
      
         
      <if test="phonenum != null">
        phonenum,
      </if>
      
         
      <if test="remarks1 != null">
        remarks1,
      </if>
      
         
      <if test="remarks2 != null">
        remarks2,
      </if>
      
         
      <if test="email != null">
        email,
      </if>
      
         
      <if test="lastlogintime != null">
        lastlogintime,
      </if>
      
         
      <if test="lastloginip != null">
        lastloginip,
      </if>
      
         
      <if test="lastequipmenttype != null">
        lastequipmenttype,
      </if>
      
         
      <if test="name != null">
        name,
      </if>
      
         </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
          <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
          <if test="icon != null">
        #{icon,jdbcType=VARCHAR},
      </if>
          <if test="phonenum != null">
        #{phonenum,jdbcType=VARCHAR},
      </if>
          <if test="remarks1 != null">
        #{remarks1,jdbcType=VARCHAR},
      </if>
          <if test="remarks2 != null">
        #{remarks2,jdbcType=VARCHAR},
      </if>
          <if test="email != null">
        #{email,jdbcType=VARCHAR},
      </if>
          <if test="lastlogintime != null">
        #{lastlogintime,jdbcType=VARCHAR},
      </if>
          <if test="lastloginip != null">
        #{lastloginip,jdbcType=VARCHAR},
      </if>
          <if test="lastequipmenttype != null">
        #{lastequipmenttype,jdbcType=VARCHAR},
      </if>
          <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
        </trim>
  </insert>
  
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.GyeeuserinformationExample" resultType="java.lang.Long">
    select count(*) from gyeeuserinformation
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  
  <update id="updateByExampleSelective" parameterType="map">
    update gyeeuserinformation
    <set>
          <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
          <if test="record.icon != null">
        icon = #{record.icon,jdbcType=VARCHAR},
      </if>
          <if test="record.phonenum != null">
        phonenum = #{record.phonenum,jdbcType=VARCHAR},
      </if>
          <if test="record.remarks1 != null">
        remarks1 = #{record.remarks1,jdbcType=VARCHAR},
      </if>
          <if test="record.remarks2 != null">
        remarks2 = #{record.remarks2,jdbcType=VARCHAR},
      </if>
          <if test="record.email != null">
        email = #{record.email,jdbcType=VARCHAR},
      </if>
          <if test="record.lastlogintime != null">
        lastlogintime = #{record.lastlogintime,jdbcType=VARCHAR},
      </if>
          <if test="record.lastloginip != null">
        lastloginip = #{record.lastloginip,jdbcType=VARCHAR},
      </if>
          <if test="record.lastequipmenttype != null">
        lastequipmenttype = #{record.lastequipmenttype,jdbcType=VARCHAR},
      </if>
          <if test="record.name != null">
        name = #{record.name,jdbcType=VARCHAR},
      </if>
         
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  
  
  <update id="updateByExample" parameterType="map">
    update gyeeuserinformation
    set
            	     	 id = #{record.id,jdbcType=VARCHAR},
    	         	     	 icon = #{record.icon,jdbcType=VARCHAR},
    	         	     	 phonenum = #{record.phonenum,jdbcType=VARCHAR},
    	         	     	 remarks1 = #{record.remarks1,jdbcType=VARCHAR},
    	         	     	 remarks2 = #{record.remarks2,jdbcType=VARCHAR},
    	         	     	 email = #{record.email,jdbcType=VARCHAR},
    	         	     	 lastlogintime = #{record.lastlogintime,jdbcType=VARCHAR},
    	         	     	 lastloginip = #{record.lastloginip,jdbcType=VARCHAR},
    	         	     	 lastequipmenttype = #{record.lastequipmenttype,jdbcType=VARCHAR},
    	         	     	 name = #{record.name,jdbcType=VARCHAR}
    	         <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  
  
      <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Gyeeuserinformation">
    update gyeeuserinformation
    <set>
                          <if test="icon != null">
        icon = #{icon,jdbcType=VARCHAR},
      </if>
                      <if test="phonenum != null">
        phonenum = #{phonenum,jdbcType=VARCHAR},
      </if>
                      <if test="remarks1 != null">
        remarks1 = #{remarks1,jdbcType=VARCHAR},
      </if>
                      <if test="remarks2 != null">
        remarks2 = #{remarks2,jdbcType=VARCHAR},
      </if>
                      <if test="email != null">
        email = #{email,jdbcType=VARCHAR},
      </if>
                      <if test="lastlogintime != null">
        lastlogintime = #{lastlogintime,jdbcType=VARCHAR},
      </if>
                      <if test="lastloginip != null">
        lastloginip = #{lastloginip,jdbcType=VARCHAR},
      </if>
                      <if test="lastequipmenttype != null">
        lastequipmenttype = #{lastequipmenttype,jdbcType=VARCHAR},
      </if>
                      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
              </set>
    where 
            id = #{id,jdbcType=VARCHAR}
                                                                                  
  </update>

      	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	   	      	

  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Gyeeuserinformation">
    update gyeeuserinformation
    set 
             	        	    	 			icon = #{icon,jdbcType=VARCHAR},
		     	        	    	 			phonenum = #{phonenum,jdbcType=VARCHAR},
		     	        	    	 			remarks1 = #{remarks1,jdbcType=VARCHAR},
		     	        	    	 			remarks2 = #{remarks2,jdbcType=VARCHAR},
		     	        	    	 			email = #{email,jdbcType=VARCHAR},
		     	        	    	 			lastlogintime = #{lastlogintime,jdbcType=VARCHAR},
		     	        	    	 			lastloginip = #{lastloginip,jdbcType=VARCHAR},
		     	        	    	 			lastequipmenttype = #{lastequipmenttype,jdbcType=VARCHAR},
		     	        	    	 			name = #{name,jdbcType=VARCHAR}
		     	        where 
            id = #{id,jdbcType=VARCHAR}
                                                                                    
  </update>
  
  <select id="queryById" parameterType="java.lang.String" resultType="com.gyee.frame.model.auto.Gyeeuserinformation">
       select * from gyeeuserinformation where id=#{userid,jdbcType=VARCHAR}
 </select>
  
                                                      
</mapper>