<?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.UserMapper">
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.User">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    <id column="UserID" jdbcType="VARCHAR" property="userid" />
    <result column="No" jdbcType="VARCHAR" property="no" />
    <result column="UserName" jdbcType="VARCHAR" property="username" />
    <result column="Password" jdbcType="VARCHAR" property="password" />
    <result column="DiscountRatePermitFlag" jdbcType="BIT" property="discountratepermitflag" />
    <result column="DiscountRate" jdbcType="DECIMAL" property="discountrate" />
    <result column="SuperSalesFlag" jdbcType="BIT" property="supersalesflag" />
    <result column="UnAuditFlag" jdbcType="BIT" property="unauditflag" />
    <result column="OnlyDispUnAuditFlag" jdbcType="BIT" property="onlydispunauditflag" />
    <result column="DepartmentID" jdbcType="VARCHAR" property="departmentid" />
    <result column="SuperFlag" jdbcType="BIT" property="superflag" />
    <result column="GroupID" jdbcType="VARCHAR" property="groupid" />
    <result column="OnlyModifySelfFlag" jdbcType="BIT" property="onlymodifyselfflag" />
    <result column="DateLimit" jdbcType="INTEGER" property="datelimit" />
    <result column="InUseFlag" jdbcType="BIT" property="inuseflag" />
    <result column="SalesTemplateFlag" jdbcType="BIT" property="salestemplateflag" />
    <result column="SalesDescription" jdbcType="VARCHAR" property="salesdescription" />
    <result column="UnitPricePermitFlag" jdbcType="BIT" property="unitpricepermitflag" />
    <result column="LoginStartTime" jdbcType="VARCHAR" property="loginstarttime" />
    <result column="LoginEndTime" jdbcType="VARCHAR" property="loginendtime" />
    <result column="NoSaturdayFlag" jdbcType="BIT" property="nosaturdayflag" />
    <result column="NoSundayFlag" jdbcType="BIT" property="nosundayflag" />
    <result column="NoHolidayFlag" jdbcType="BIT" property="noholidayflag" />
    <result column="ModifyDate" jdbcType="TIMESTAMP" property="modifydate" />
    <result column="MobilPhone" jdbcType="VARCHAR" property="mobilphone" />
    <result column="MaxDiscount" jdbcType="DECIMAL" property="maxdiscount" />
    <result column="MaxFullDis" jdbcType="DECIMAL" property="maxfulldis" />
    <result column="MobilePhone2" jdbcType="VARCHAR" property="mobilephone2" />
    <result column="POSAdminFlag" jdbcType="BIT" property="posadminflag" />
    <result column="OnlySelfInvoice" jdbcType="BIT" property="onlyselfinvoice" />
    <result column="HelpCode" jdbcType="VARCHAR" property="helpcode" />
    <result column="SendMailAdd" jdbcType="VARCHAR" property="sendmailadd" />
    <result column="SMTPServer" jdbcType="VARCHAR" property="smtpserver" />
    <result column="SMTPUserName" jdbcType="VARCHAR" property="smtpusername" />
    <result column="SMTPPassword" jdbcType="VARCHAR" property="smtppassword" />
    <result column="UseBrandRight" jdbcType="BIT" property="usebrandright" />
    <result column="UsePicRight" jdbcType="BIT" property="usepicright" />
    <result column="CanModifyNo" jdbcType="BIT" property="canmodifyno" />
    <result column="CustomerID" jdbcType="VARCHAR" property="customerid" />
    <result column="HisOwnDepartmentVoice" jdbcType="BIT" property="hisowndepartmentvoice" />
    <result column="CanModifyDate" jdbcType="BIT" property="canmodifydate" />
    <result column="ModifyPriceOnly" jdbcType="BIT" property="modifypriceonly" />
    <result column="CanEditPassed" jdbcType="BIT" property="caneditpassed" />
    <result column="SuperSalesXYFlag" jdbcType="BIT" property="supersalesxyflag" />
    <result column="SuperSalesBackFlag" jdbcType="BIT" property="supersalesbackflag" />
    <result column="NoMoreLoginFlag" jdbcType="BIT" property="nomoreloginflag" />
    <result column="StopFlag" jdbcType="BIT" property="stopflag" />
    <result column="AllDeptRight" jdbcType="BIT" property="alldeptright" />
    <result column="DiscountRatePermitFlag2" jdbcType="BIT" property="discountratepermitflag2" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    <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="Base_Column_List">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    UserID, No, UserName, Password, DiscountRatePermitFlag, DiscountRate, SuperSalesFlag, 
    UnAuditFlag, OnlyDispUnAuditFlag, DepartmentID, SuperFlag, GroupID, OnlyModifySelfFlag, 
    DateLimit, InUseFlag, SalesTemplateFlag, SalesDescription, UnitPricePermitFlag, LoginStartTime, 
    LoginEndTime, NoSaturdayFlag, NoSundayFlag, NoHolidayFlag, ModifyDate, MobilPhone, 
    MaxDiscount, MaxFullDis, MobilePhone2, POSAdminFlag, OnlySelfInvoice, HelpCode, SendMailAdd, 
    SMTPServer, SMTPUserName, SMTPPassword, UseBrandRight, UsePicRight, CanModifyNo, 
    CustomerID, HisOwnDepartmentVoice, CanModifyDate, ModifyPriceOnly, CanEditPassed, 
    SuperSalesXYFlag, SuperSalesBackFlag, NoMoreLoginFlag, StopFlag, AllDeptRight, DiscountRatePermitFlag2
  </sql>
  <select id="selectByExample" parameterType="com.fuxi.ws.data.entity.UserExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from [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 - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    select 
    <include refid="Base_Column_List" />
    from [User]
    where UserID = #{userid,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    delete from [User]
    where UserID = #{userid,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.User">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    insert into [User] (UserID, No, UserName, 
      Password, DiscountRatePermitFlag, DiscountRate, 
      SuperSalesFlag, UnAuditFlag, OnlyDispUnAuditFlag, 
      DepartmentID, SuperFlag, GroupID, 
      OnlyModifySelfFlag, DateLimit, InUseFlag, 
      SalesTemplateFlag, SalesDescription, UnitPricePermitFlag, 
      LoginStartTime, LoginEndTime, NoSaturdayFlag, 
      NoSundayFlag, NoHolidayFlag, ModifyDate, 
      MobilPhone, MaxDiscount, MaxFullDis, 
      MobilePhone2, POSAdminFlag, OnlySelfInvoice, 
      HelpCode, SendMailAdd, SMTPServer, 
      SMTPUserName, SMTPPassword, UseBrandRight, 
      UsePicRight, CanModifyNo, CustomerID, 
      HisOwnDepartmentVoice, CanModifyDate, ModifyPriceOnly, 
      CanEditPassed, SuperSalesXYFlag, SuperSalesBackFlag, 
      NoMoreLoginFlag, StopFlag, AllDeptRight, 
      DiscountRatePermitFlag2)
    values (#{userid,jdbcType=VARCHAR}, #{no,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, 
      #{password,jdbcType=VARCHAR}, #{discountratepermitflag,jdbcType=BIT}, #{discountrate,jdbcType=DECIMAL}, 
      #{supersalesflag,jdbcType=BIT}, #{unauditflag,jdbcType=BIT}, #{onlydispunauditflag,jdbcType=BIT}, 
      #{departmentid,jdbcType=VARCHAR}, #{superflag,jdbcType=BIT}, #{groupid,jdbcType=VARCHAR}, 
      #{onlymodifyselfflag,jdbcType=BIT}, #{datelimit,jdbcType=INTEGER}, #{inuseflag,jdbcType=BIT}, 
      #{salestemplateflag,jdbcType=BIT}, #{salesdescription,jdbcType=VARCHAR}, #{unitpricepermitflag,jdbcType=BIT}, 
      #{loginstarttime,jdbcType=VARCHAR}, #{loginendtime,jdbcType=VARCHAR}, #{nosaturdayflag,jdbcType=BIT}, 
      #{nosundayflag,jdbcType=BIT}, #{noholidayflag,jdbcType=BIT}, #{modifydate,jdbcType=TIMESTAMP}, 
      #{mobilphone,jdbcType=VARCHAR}, #{maxdiscount,jdbcType=DECIMAL}, #{maxfulldis,jdbcType=DECIMAL}, 
      #{mobilephone2,jdbcType=VARCHAR}, #{posadminflag,jdbcType=BIT}, #{onlyselfinvoice,jdbcType=BIT}, 
      #{helpcode,jdbcType=VARCHAR}, #{sendmailadd,jdbcType=VARCHAR}, #{smtpserver,jdbcType=VARCHAR}, 
      #{smtpusername,jdbcType=VARCHAR}, #{smtppassword,jdbcType=VARCHAR}, #{usebrandright,jdbcType=BIT}, 
      #{usepicright,jdbcType=BIT}, #{canmodifyno,jdbcType=BIT}, #{customerid,jdbcType=VARCHAR}, 
      #{hisowndepartmentvoice,jdbcType=BIT}, #{canmodifydate,jdbcType=BIT}, #{modifypriceonly,jdbcType=BIT}, 
      #{caneditpassed,jdbcType=BIT}, #{supersalesxyflag,jdbcType=BIT}, #{supersalesbackflag,jdbcType=BIT}, 
      #{nomoreloginflag,jdbcType=BIT}, #{stopflag,jdbcType=BIT}, #{alldeptright,jdbcType=BIT}, 
      #{discountratepermitflag2,jdbcType=BIT})
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.User">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    insert into [User]
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="userid != null">
        UserID,
      </if>
      <if test="no != null">
        No,
      </if>
      <if test="username != null">
        UserName,
      </if>
      <if test="password != null">
        Password,
      </if>
      <if test="discountratepermitflag != null">
        DiscountRatePermitFlag,
      </if>
      <if test="discountrate != null">
        DiscountRate,
      </if>
      <if test="supersalesflag != null">
        SuperSalesFlag,
      </if>
      <if test="unauditflag != null">
        UnAuditFlag,
      </if>
      <if test="onlydispunauditflag != null">
        OnlyDispUnAuditFlag,
      </if>
      <if test="departmentid != null">
        DepartmentID,
      </if>
      <if test="superflag != null">
        SuperFlag,
      </if>
      <if test="groupid != null">
        GroupID,
      </if>
      <if test="onlymodifyselfflag != null">
        OnlyModifySelfFlag,
      </if>
      <if test="datelimit != null">
        DateLimit,
      </if>
      <if test="inuseflag != null">
        InUseFlag,
      </if>
      <if test="salestemplateflag != null">
        SalesTemplateFlag,
      </if>
      <if test="salesdescription != null">
        SalesDescription,
      </if>
      <if test="unitpricepermitflag != null">
        UnitPricePermitFlag,
      </if>
      <if test="loginstarttime != null">
        LoginStartTime,
      </if>
      <if test="loginendtime != null">
        LoginEndTime,
      </if>
      <if test="nosaturdayflag != null">
        NoSaturdayFlag,
      </if>
      <if test="nosundayflag != null">
        NoSundayFlag,
      </if>
      <if test="noholidayflag != null">
        NoHolidayFlag,
      </if>
      <if test="modifydate != null">
        ModifyDate,
      </if>
      <if test="mobilphone != null">
        MobilPhone,
      </if>
      <if test="maxdiscount != null">
        MaxDiscount,
      </if>
      <if test="maxfulldis != null">
        MaxFullDis,
      </if>
      <if test="mobilephone2 != null">
        MobilePhone2,
      </if>
      <if test="posadminflag != null">
        POSAdminFlag,
      </if>
      <if test="onlyselfinvoice != null">
        OnlySelfInvoice,
      </if>
      <if test="helpcode != null">
        HelpCode,
      </if>
      <if test="sendmailadd != null">
        SendMailAdd,
      </if>
      <if test="smtpserver != null">
        SMTPServer,
      </if>
      <if test="smtpusername != null">
        SMTPUserName,
      </if>
      <if test="smtppassword != null">
        SMTPPassword,
      </if>
      <if test="usebrandright != null">
        UseBrandRight,
      </if>
      <if test="usepicright != null">
        UsePicRight,
      </if>
      <if test="canmodifyno != null">
        CanModifyNo,
      </if>
      <if test="customerid != null">
        CustomerID,
      </if>
      <if test="hisowndepartmentvoice != null">
        HisOwnDepartmentVoice,
      </if>
      <if test="canmodifydate != null">
        CanModifyDate,
      </if>
      <if test="modifypriceonly != null">
        ModifyPriceOnly,
      </if>
      <if test="caneditpassed != null">
        CanEditPassed,
      </if>
      <if test="supersalesxyflag != null">
        SuperSalesXYFlag,
      </if>
      <if test="supersalesbackflag != null">
        SuperSalesBackFlag,
      </if>
      <if test="nomoreloginflag != null">
        NoMoreLoginFlag,
      </if>
      <if test="stopflag != null">
        StopFlag,
      </if>
      <if test="alldeptright != null">
        AllDeptRight,
      </if>
      <if test="discountratepermitflag2 != null">
        DiscountRatePermitFlag2,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="userid != null">
        #{userid,jdbcType=VARCHAR},
      </if>
      <if test="no != null">
        #{no,jdbcType=VARCHAR},
      </if>
      <if test="username != null">
        #{username,jdbcType=VARCHAR},
      </if>
      <if test="password != null">
        #{password,jdbcType=VARCHAR},
      </if>
      <if test="discountratepermitflag != null">
        #{discountratepermitflag,jdbcType=BIT},
      </if>
      <if test="discountrate != null">
        #{discountrate,jdbcType=DECIMAL},
      </if>
      <if test="supersalesflag != null">
        #{supersalesflag,jdbcType=BIT},
      </if>
      <if test="unauditflag != null">
        #{unauditflag,jdbcType=BIT},
      </if>
      <if test="onlydispunauditflag != null">
        #{onlydispunauditflag,jdbcType=BIT},
      </if>
      <if test="departmentid != null">
        #{departmentid,jdbcType=VARCHAR},
      </if>
      <if test="superflag != null">
        #{superflag,jdbcType=BIT},
      </if>
      <if test="groupid != null">
        #{groupid,jdbcType=VARCHAR},
      </if>
      <if test="onlymodifyselfflag != null">
        #{onlymodifyselfflag,jdbcType=BIT},
      </if>
      <if test="datelimit != null">
        #{datelimit,jdbcType=INTEGER},
      </if>
      <if test="inuseflag != null">
        #{inuseflag,jdbcType=BIT},
      </if>
      <if test="salestemplateflag != null">
        #{salestemplateflag,jdbcType=BIT},
      </if>
      <if test="salesdescription != null">
        #{salesdescription,jdbcType=VARCHAR},
      </if>
      <if test="unitpricepermitflag != null">
        #{unitpricepermitflag,jdbcType=BIT},
      </if>
      <if test="loginstarttime != null">
        #{loginstarttime,jdbcType=VARCHAR},
      </if>
      <if test="loginendtime != null">
        #{loginendtime,jdbcType=VARCHAR},
      </if>
      <if test="nosaturdayflag != null">
        #{nosaturdayflag,jdbcType=BIT},
      </if>
      <if test="nosundayflag != null">
        #{nosundayflag,jdbcType=BIT},
      </if>
      <if test="noholidayflag != null">
        #{noholidayflag,jdbcType=BIT},
      </if>
      <if test="modifydate != null">
        #{modifydate,jdbcType=TIMESTAMP},
      </if>
      <if test="mobilphone != null">
        #{mobilphone,jdbcType=VARCHAR},
      </if>
      <if test="maxdiscount != null">
        #{maxdiscount,jdbcType=DECIMAL},
      </if>
      <if test="maxfulldis != null">
        #{maxfulldis,jdbcType=DECIMAL},
      </if>
      <if test="mobilephone2 != null">
        #{mobilephone2,jdbcType=VARCHAR},
      </if>
      <if test="posadminflag != null">
        #{posadminflag,jdbcType=BIT},
      </if>
      <if test="onlyselfinvoice != null">
        #{onlyselfinvoice,jdbcType=BIT},
      </if>
      <if test="helpcode != null">
        #{helpcode,jdbcType=VARCHAR},
      </if>
      <if test="sendmailadd != null">
        #{sendmailadd,jdbcType=VARCHAR},
      </if>
      <if test="smtpserver != null">
        #{smtpserver,jdbcType=VARCHAR},
      </if>
      <if test="smtpusername != null">
        #{smtpusername,jdbcType=VARCHAR},
      </if>
      <if test="smtppassword != null">
        #{smtppassword,jdbcType=VARCHAR},
      </if>
      <if test="usebrandright != null">
        #{usebrandright,jdbcType=BIT},
      </if>
      <if test="usepicright != null">
        #{usepicright,jdbcType=BIT},
      </if>
      <if test="canmodifyno != null">
        #{canmodifyno,jdbcType=BIT},
      </if>
      <if test="customerid != null">
        #{customerid,jdbcType=VARCHAR},
      </if>
      <if test="hisowndepartmentvoice != null">
        #{hisowndepartmentvoice,jdbcType=BIT},
      </if>
      <if test="canmodifydate != null">
        #{canmodifydate,jdbcType=BIT},
      </if>
      <if test="modifypriceonly != null">
        #{modifypriceonly,jdbcType=BIT},
      </if>
      <if test="caneditpassed != null">
        #{caneditpassed,jdbcType=BIT},
      </if>
      <if test="supersalesxyflag != null">
        #{supersalesxyflag,jdbcType=BIT},
      </if>
      <if test="supersalesbackflag != null">
        #{supersalesbackflag,jdbcType=BIT},
      </if>
      <if test="nomoreloginflag != null">
        #{nomoreloginflag,jdbcType=BIT},
      </if>
      <if test="stopflag != null">
        #{stopflag,jdbcType=BIT},
      </if>
      <if test="alldeptright != null">
        #{alldeptright,jdbcType=BIT},
      </if>
      <if test="discountratepermitflag2 != null">
        #{discountratepermitflag2,jdbcType=BIT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.UserExample" resultType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    select count(*) from [User]
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.User">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    update [User]
    <set>
      <if test="no != null">
        No = #{no,jdbcType=VARCHAR},
      </if>
      <if test="username != null">
        UserName = #{username,jdbcType=VARCHAR},
      </if>
      <if test="password != null">
        Password = #{password,jdbcType=VARCHAR},
      </if>
      <if test="discountratepermitflag != null">
        DiscountRatePermitFlag = #{discountratepermitflag,jdbcType=BIT},
      </if>
      <if test="discountrate != null">
        DiscountRate = #{discountrate,jdbcType=DECIMAL},
      </if>
      <if test="supersalesflag != null">
        SuperSalesFlag = #{supersalesflag,jdbcType=BIT},
      </if>
      <if test="unauditflag != null">
        UnAuditFlag = #{unauditflag,jdbcType=BIT},
      </if>
      <if test="onlydispunauditflag != null">
        OnlyDispUnAuditFlag = #{onlydispunauditflag,jdbcType=BIT},
      </if>
      <if test="departmentid != null">
        DepartmentID = #{departmentid,jdbcType=VARCHAR},
      </if>
      <if test="superflag != null">
        SuperFlag = #{superflag,jdbcType=BIT},
      </if>
      <if test="groupid != null">
        GroupID = #{groupid,jdbcType=VARCHAR},
      </if>
      <if test="onlymodifyselfflag != null">
        OnlyModifySelfFlag = #{onlymodifyselfflag,jdbcType=BIT},
      </if>
      <if test="datelimit != null">
        DateLimit = #{datelimit,jdbcType=INTEGER},
      </if>
      <if test="inuseflag != null">
        InUseFlag = #{inuseflag,jdbcType=BIT},
      </if>
      <if test="salestemplateflag != null">
        SalesTemplateFlag = #{salestemplateflag,jdbcType=BIT},
      </if>
      <if test="salesdescription != null">
        SalesDescription = #{salesdescription,jdbcType=VARCHAR},
      </if>
      <if test="unitpricepermitflag != null">
        UnitPricePermitFlag = #{unitpricepermitflag,jdbcType=BIT},
      </if>
      <if test="loginstarttime != null">
        LoginStartTime = #{loginstarttime,jdbcType=VARCHAR},
      </if>
      <if test="loginendtime != null">
        LoginEndTime = #{loginendtime,jdbcType=VARCHAR},
      </if>
      <if test="nosaturdayflag != null">
        NoSaturdayFlag = #{nosaturdayflag,jdbcType=BIT},
      </if>
      <if test="nosundayflag != null">
        NoSundayFlag = #{nosundayflag,jdbcType=BIT},
      </if>
      <if test="noholidayflag != null">
        NoHolidayFlag = #{noholidayflag,jdbcType=BIT},
      </if>
      <if test="modifydate != null">
        ModifyDate = #{modifydate,jdbcType=TIMESTAMP},
      </if>
      <if test="mobilphone != null">
        MobilPhone = #{mobilphone,jdbcType=VARCHAR},
      </if>
      <if test="maxdiscount != null">
        MaxDiscount = #{maxdiscount,jdbcType=DECIMAL},
      </if>
      <if test="maxfulldis != null">
        MaxFullDis = #{maxfulldis,jdbcType=DECIMAL},
      </if>
      <if test="mobilephone2 != null">
        MobilePhone2 = #{mobilephone2,jdbcType=VARCHAR},
      </if>
      <if test="posadminflag != null">
        POSAdminFlag = #{posadminflag,jdbcType=BIT},
      </if>
      <if test="onlyselfinvoice != null">
        OnlySelfInvoice = #{onlyselfinvoice,jdbcType=BIT},
      </if>
      <if test="helpcode != null">
        HelpCode = #{helpcode,jdbcType=VARCHAR},
      </if>
      <if test="sendmailadd != null">
        SendMailAdd = #{sendmailadd,jdbcType=VARCHAR},
      </if>
      <if test="smtpserver != null">
        SMTPServer = #{smtpserver,jdbcType=VARCHAR},
      </if>
      <if test="smtpusername != null">
        SMTPUserName = #{smtpusername,jdbcType=VARCHAR},
      </if>
      <if test="smtppassword != null">
        SMTPPassword = #{smtppassword,jdbcType=VARCHAR},
      </if>
      <if test="usebrandright != null">
        UseBrandRight = #{usebrandright,jdbcType=BIT},
      </if>
      <if test="usepicright != null">
        UsePicRight = #{usepicright,jdbcType=BIT},
      </if>
      <if test="canmodifyno != null">
        CanModifyNo = #{canmodifyno,jdbcType=BIT},
      </if>
      <if test="customerid != null">
        CustomerID = #{customerid,jdbcType=VARCHAR},
      </if>
      <if test="hisowndepartmentvoice != null">
        HisOwnDepartmentVoice = #{hisowndepartmentvoice,jdbcType=BIT},
      </if>
      <if test="canmodifydate != null">
        CanModifyDate = #{canmodifydate,jdbcType=BIT},
      </if>
      <if test="modifypriceonly != null">
        ModifyPriceOnly = #{modifypriceonly,jdbcType=BIT},
      </if>
      <if test="caneditpassed != null">
        CanEditPassed = #{caneditpassed,jdbcType=BIT},
      </if>
      <if test="supersalesxyflag != null">
        SuperSalesXYFlag = #{supersalesxyflag,jdbcType=BIT},
      </if>
      <if test="supersalesbackflag != null">
        SuperSalesBackFlag = #{supersalesbackflag,jdbcType=BIT},
      </if>
      <if test="nomoreloginflag != null">
        NoMoreLoginFlag = #{nomoreloginflag,jdbcType=BIT},
      </if>
      <if test="stopflag != null">
        StopFlag = #{stopflag,jdbcType=BIT},
      </if>
      <if test="alldeptright != null">
        AllDeptRight = #{alldeptright,jdbcType=BIT},
      </if>
      <if test="discountratepermitflag2 != null">
        DiscountRatePermitFlag2 = #{discountratepermitflag2,jdbcType=BIT},
      </if>
    </set>
    where UserID = #{userid,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.User">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri May 15 15:48:32 CST 2015.
    -->
    update [User]
    set No = #{no,jdbcType=VARCHAR},
      UserName = #{username,jdbcType=VARCHAR},
      Password = #{password,jdbcType=VARCHAR},
      DiscountRatePermitFlag = #{discountratepermitflag,jdbcType=BIT},
      DiscountRate = #{discountrate,jdbcType=DECIMAL},
      SuperSalesFlag = #{supersalesflag,jdbcType=BIT},
      UnAuditFlag = #{unauditflag,jdbcType=BIT},
      OnlyDispUnAuditFlag = #{onlydispunauditflag,jdbcType=BIT},
      DepartmentID = #{departmentid,jdbcType=VARCHAR},
      SuperFlag = #{superflag,jdbcType=BIT},
      GroupID = #{groupid,jdbcType=VARCHAR},
      OnlyModifySelfFlag = #{onlymodifyselfflag,jdbcType=BIT},
      DateLimit = #{datelimit,jdbcType=INTEGER},
      InUseFlag = #{inuseflag,jdbcType=BIT},
      SalesTemplateFlag = #{salestemplateflag,jdbcType=BIT},
      SalesDescription = #{salesdescription,jdbcType=VARCHAR},
      UnitPricePermitFlag = #{unitpricepermitflag,jdbcType=BIT},
      LoginStartTime = #{loginstarttime,jdbcType=VARCHAR},
      LoginEndTime = #{loginendtime,jdbcType=VARCHAR},
      NoSaturdayFlag = #{nosaturdayflag,jdbcType=BIT},
      NoSundayFlag = #{nosundayflag,jdbcType=BIT},
      NoHolidayFlag = #{noholidayflag,jdbcType=BIT},
      ModifyDate = #{modifydate,jdbcType=TIMESTAMP},
      MobilPhone = #{mobilphone,jdbcType=VARCHAR},
      MaxDiscount = #{maxdiscount,jdbcType=DECIMAL},
      MaxFullDis = #{maxfulldis,jdbcType=DECIMAL},
      MobilePhone2 = #{mobilephone2,jdbcType=VARCHAR},
      POSAdminFlag = #{posadminflag,jdbcType=BIT},
      OnlySelfInvoice = #{onlyselfinvoice,jdbcType=BIT},
      HelpCode = #{helpcode,jdbcType=VARCHAR},
      SendMailAdd = #{sendmailadd,jdbcType=VARCHAR},
      SMTPServer = #{smtpserver,jdbcType=VARCHAR},
      SMTPUserName = #{smtpusername,jdbcType=VARCHAR},
      SMTPPassword = #{smtppassword,jdbcType=VARCHAR},
      UseBrandRight = #{usebrandright,jdbcType=BIT},
      UsePicRight = #{usepicright,jdbcType=BIT},
      CanModifyNo = #{canmodifyno,jdbcType=BIT},
      CustomerID = #{customerid,jdbcType=VARCHAR},
      HisOwnDepartmentVoice = #{hisowndepartmentvoice,jdbcType=BIT},
      CanModifyDate = #{canmodifydate,jdbcType=BIT},
      ModifyPriceOnly = #{modifypriceonly,jdbcType=BIT},
      CanEditPassed = #{caneditpassed,jdbcType=BIT},
      SuperSalesXYFlag = #{supersalesxyflag,jdbcType=BIT},
      SuperSalesBackFlag = #{supersalesbackflag,jdbcType=BIT},
      NoMoreLoginFlag = #{nomoreloginflag,jdbcType=BIT},
      StopFlag = #{stopflag,jdbcType=BIT},
      AllDeptRight = #{alldeptright,jdbcType=BIT},
      DiscountRatePermitFlag2 = #{discountratepermitflag2,jdbcType=BIT}
    where UserID = #{userid,jdbcType=VARCHAR}
  </update>
</mapper>