<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.base.system.user.dao.ibatis.UserDaoImpl">

    <!-- 字段和属性映射 -->
    <resultMap type="UserEntity" id="UserEntity-Map">
        <result property="id" column="id" />
        <result property="loginName" column="loginName" />
        <result property="loginPwd" column="loginPwd" />
        <result property="loginPwd1" column="loginPwd1" />
        <result property="loginPwd2" column="loginPwd2" />
        <result property="loginPwd3" column="loginPwd3" />
        <result property="loginLimitAddress" column="loginLimitAddress" />
        <result property="realName" column="realName" />
        <result property="mobile" column="mobile" />
        <result property="phone" column="phone" />
        <result property="email" column="email" />
        <result property="qq" column="qq" />
        <result property="userType" column="userType" />
        <result property="siteId" column="siteId" />
        <result property="status" column="status" />
        <result property="customerId" column="customerId" />
        <result property="createTime" column="createTime" />
        <result property="createUserId" column="createUserId" />
        <result property="createUserName" column="createUserName" />
        <result property="lastLoginTime" column="lastLoginTime" />
        <result property="lastLoginAddress" column="lastLoginAddress" />
        <result property="lastModPwdTime" column="lastModPwdTime" />
        <result property="lastModPwdAddr" column="lastModPwdAddr" />
    </resultMap>

    <!-- 表所有列 -->
    <sql id="_columns">
        <trim suffixOverrides="," suffix="">
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
                    a.id as id,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('loginName') or colPickMode == 1 and data.containsKey('loginName')))">
                    a.loginName as loginName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('loginPwd') or colPickMode == 1 and data.containsKey('loginPwd')))">
                    a.loginPwd as loginPwd,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('loginPwd1') or colPickMode == 1 and data.containsKey('loginPwd1')))">
                    a.loginPwd1 as loginPwd1,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('loginPwd2') or colPickMode == 1 and data.containsKey('loginPwd2')))">
                    a.loginPwd2 as loginPwd2,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('loginPwd3') or colPickMode == 1 and data.containsKey('loginPwd3')))">
                    a.loginPwd3 as loginPwd3,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('loginLimitAddress') or colPickMode == 1 and data.containsKey('loginLimitAddress')))">
                    a.loginLimitAddress as loginLimitAddress,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('realName') or colPickMode == 1 and data.containsKey('realName')))">
                    a.realName as realName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('mobile') or colPickMode == 1 and data.containsKey('mobile')))">
                    a.mobile as mobile,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('phone') or colPickMode == 1 and data.containsKey('phone')))">
                    a.phone as phone,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('email') or colPickMode == 1 and data.containsKey('email')))">
                    a.email as email,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('qq') or colPickMode == 1 and data.containsKey('qq')))">
                    a.qq as qq,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('userType') or colPickMode == 1 and data.containsKey('userType')))">
                    a.userType as userType,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteId') or colPickMode == 1 and data.containsKey('siteId')))">
                    a.siteId as siteId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('status') or colPickMode == 1 and data.containsKey('status')))">
                    a.status as status,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('customerId') or colPickMode == 1 and data.containsKey('customerId')))">
                    a.customerId as customerId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
                    a.createTime as createTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
                    a.createUserId as createUserId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserName') or colPickMode == 1 and data.containsKey('createUserName')))">
                    a.createUserName as createUserName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginTime') or colPickMode == 1 and data.containsKey('lastLoginTime')))">
                    a.lastLoginTime as lastLoginTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))">
                    a.lastLoginAddress as lastLoginAddress,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastModPwdTime') or colPickMode == 1 and data.containsKey('lastModPwdTime')))">
                    a.lastModPwdTime as lastModPwdTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastModPwdAddr') or colPickMode == 1 and data.containsKey('lastModPwdAddr')))">
                    a.lastModPwdAddr as lastModPwdAddr,
                </if>
        </trim>
    </sql>
    <!-- 新增 -->
        <insert id="insert" parameterType="UserEntity" useGeneratedKeys="true" keyProperty="id">
            insert into mortals_xhx_user
            (loginName,loginPwd,loginPwd1,loginPwd2,loginPwd3,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteId,status,customerId,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress,lastModPwdTime,lastModPwdAddr)
            VALUES
            (#{loginName},#{loginPwd},#{loginPwd1},#{loginPwd2},#{loginPwd3},#{loginLimitAddress},#{realName},#{mobile},#{phone},#{email},#{qq},#{userType},#{siteId},#{status},#{customerId},#{createTime},#{createUserId},#{createUserName},#{lastLoginTime},#{lastLoginAddress},#{lastModPwdTime},#{lastModPwdAddr})
        </insert>

        <!-- 批量新增 -->
        <insert id="insertBatch" parameterType="paramDto">
            insert into mortals_xhx_user
            (loginName,loginPwd,loginPwd1,loginPwd2,loginPwd3,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteId,status,customerId,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress,lastModPwdTime,lastModPwdAddr)
            VALUES
            <foreach collection="data.dataList" item="item" index="index" separator="," >
                (#{item.loginName},#{item.loginPwd},#{item.loginPwd1},#{item.loginPwd2},#{item.loginPwd3},#{item.loginLimitAddress},#{item.realName},#{item.mobile},#{item.phone},#{item.email},#{item.qq},#{item.userType},#{item.siteId},#{item.status},#{item.customerId},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.lastLoginTime},#{item.lastLoginAddress},#{item.lastModPwdTime},#{item.lastModPwdAddr})
            </foreach>
        </insert>
    <!-- 根据ParamDto更新 -->
    <update id="update" parameterType="paramDto">
        update mortals_xhx_user as a
        set
        <trim suffixOverrides="," suffix="">
            <if test="(colPickMode==0 and data.containsKey('loginName')) or (colPickMode==1 and !data.containsKey('loginName'))">
                a.loginName=#{data.loginName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('loginPwd')) or (colPickMode==1 and !data.containsKey('loginPwd'))">
                a.loginPwd=#{data.loginPwd},
            </if>
            <if test="(colPickMode==0 and data.containsKey('loginPwd1')) or (colPickMode==1 and !data.containsKey('loginPwd1'))">
                a.loginPwd1=#{data.loginPwd1},
            </if>
            <if test="(colPickMode==0 and data.containsKey('loginPwd2')) or (colPickMode==1 and !data.containsKey('loginPwd2'))">
                a.loginPwd2=#{data.loginPwd2},
            </if>
            <if test="(colPickMode==0 and data.containsKey('loginPwd3')) or (colPickMode==1 and !data.containsKey('loginPwd3'))">
                a.loginPwd3=#{data.loginPwd3},
            </if>
            <if test="(colPickMode==0 and data.containsKey('loginLimitAddress')) or (colPickMode==1 and !data.containsKey('loginLimitAddress'))">
                a.loginLimitAddress=#{data.loginLimitAddress},
            </if>
            <if test="(colPickMode==0 and data.containsKey('realName')) or (colPickMode==1 and !data.containsKey('realName'))">
                a.realName=#{data.realName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('mobile')) or (colPickMode==1 and !data.containsKey('mobile'))">
                a.mobile=#{data.mobile},
            </if>
            <if test="(colPickMode==0 and data.containsKey('phone')) or (colPickMode==1 and !data.containsKey('phone'))">
                a.phone=#{data.phone},
            </if>
            <if test="(colPickMode==0 and data.containsKey('email')) or (colPickMode==1 and !data.containsKey('email'))">
                a.email=#{data.email},
            </if>
            <if test="(colPickMode==0 and data.containsKey('qq')) or (colPickMode==1 and !data.containsKey('qq'))">
                a.qq=#{data.qq},
            </if>
            <if test="(colPickMode==0 and data.containsKey('userType')) or (colPickMode==1 and !data.containsKey('userType'))">
                a.userType=#{data.userType},
            </if>
            <if test="(colPickMode==0 and data.containsKey('userTypeIncrement')) or (colPickMode==1 and !data.containsKey('userTypeIncrement'))">
                a.userType=ifnull(a.userType,0) + #{data.userTypeIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('siteId')) or (colPickMode==1 and !data.containsKey('siteId'))">
                a.siteId=#{data.siteId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('siteIdIncrement')) or (colPickMode==1 and !data.containsKey('siteIdIncrement'))">
                a.siteId=ifnull(a.siteId,0) + #{data.siteIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('status')) or (colPickMode==1 and !data.containsKey('status'))">
                a.status=#{data.status},
            </if>
            <if test="(colPickMode==0 and data.containsKey('statusIncrement')) or (colPickMode==1 and !data.containsKey('statusIncrement'))">
                a.status=ifnull(a.status,0) + #{data.statusIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('customerId')) or (colPickMode==1 and !data.containsKey('customerId'))">
                a.customerId=#{data.customerId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('customerIdIncrement')) or (colPickMode==1 and !data.containsKey('customerIdIncrement'))">
                a.customerId=ifnull(a.customerId,0) + #{data.customerIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
                a.createTime=#{data.createTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
                a.createUserId=#{data.createUserId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
                a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createUserName')) or (colPickMode==1 and !data.containsKey('createUserName'))">
                a.createUserName=#{data.createUserName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('lastLoginTime')) or (colPickMode==1 and !data.containsKey('lastLoginTime'))">
                a.lastLoginTime=#{data.lastLoginTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('lastLoginAddress')) or (colPickMode==1 and !data.containsKey('lastLoginAddress'))">
                a.lastLoginAddress=#{data.lastLoginAddress},
            </if>
            <if test="(colPickMode==0 and data.containsKey('lastModPwdTime')) or (colPickMode==1 and !data.containsKey('lastModPwdTime'))">
                a.lastModPwdTime=#{data.lastModPwdTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('lastModPwdAddr')) or (colPickMode==1 and !data.containsKey('lastModPwdAddr'))">
                a.lastModPwdAddr=#{data.lastModPwdAddr},
            </if>
        </trim>
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </update>
    <!-- 批量更新 -->
    <update id="updateBatch" parameterType="paramDto">
        update mortals_xhx_user as a
        <trim prefix="set" suffixOverrides=",">


                <trim prefix="loginName=(case" suffix="ELSE loginName end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('loginName')) or (colPickMode==1 and !item.containsKey('loginName'))">
                            when a.id=#{item.id} then #{item.loginName}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="loginPwd=(case" suffix="ELSE loginPwd end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('loginPwd')) or (colPickMode==1 and !item.containsKey('loginPwd'))">
                            when a.id=#{item.id} then #{item.loginPwd}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="loginPwd1=(case" suffix="ELSE loginPwd1 end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('loginPwd1')) or (colPickMode==1 and !item.containsKey('loginPwd1'))">
                            when a.id=#{item.id} then #{item.loginPwd1}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="loginPwd2=(case" suffix="ELSE loginPwd2 end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('loginPwd2')) or (colPickMode==1 and !item.containsKey('loginPwd2'))">
                            when a.id=#{item.id} then #{item.loginPwd2}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="loginPwd3=(case" suffix="ELSE loginPwd3 end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('loginPwd3')) or (colPickMode==1 and !item.containsKey('loginPwd3'))">
                            when a.id=#{item.id} then #{item.loginPwd3}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="loginLimitAddress=(case" suffix="ELSE loginLimitAddress end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('loginLimitAddress')) or (colPickMode==1 and !item.containsKey('loginLimitAddress'))">
                            when a.id=#{item.id} then #{item.loginLimitAddress}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="realName=(case" suffix="ELSE realName end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('realName')) or (colPickMode==1 and !item.containsKey('realName'))">
                            when a.id=#{item.id} then #{item.realName}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="mobile=(case" suffix="ELSE mobile end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('mobile')) or (colPickMode==1 and !item.containsKey('mobile'))">
                            when a.id=#{item.id} then #{item.mobile}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="phone=(case" suffix="ELSE phone end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('phone')) or (colPickMode==1 and !item.containsKey('phone'))">
                            when a.id=#{item.id} then #{item.phone}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="email=(case" suffix="ELSE email end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('email')) or (colPickMode==1 and !item.containsKey('email'))">
                            when a.id=#{item.id} then #{item.email}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="qq=(case" suffix="ELSE qq end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('qq')) or (colPickMode==1 and !item.containsKey('qq'))">
                            when a.id=#{item.id} then #{item.qq}
                        </if>
                    </foreach>
                </trim>

                        <trim prefix="userType=(case" suffix="ELSE userType end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('userType')) or (colPickMode==1 and !item.containsKey('userType'))">
                                        when a.id=#{item.id} then #{item.userType}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('userTypeIncrement')) or (colPickMode==1 and !item.containsKey('userTypeIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.userType,0) + #{item.userTypeIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>

                        <trim prefix="siteId=(case" suffix="ELSE siteId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('siteId')) or (colPickMode==1 and !item.containsKey('siteId'))">
                                        when a.id=#{item.id} then #{item.siteId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('siteIdIncrement')) or (colPickMode==1 and !item.containsKey('siteIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.siteId,0) + #{item.siteIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>

                        <trim prefix="status=(case" suffix="ELSE status end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('status')) or (colPickMode==1 and !item.containsKey('status'))">
                                        when a.id=#{item.id} then #{item.status}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('statusIncrement')) or (colPickMode==1 and !item.containsKey('statusIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.status,0) + #{item.statusIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>

                        <trim prefix="customerId=(case" suffix="ELSE customerId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('customerId')) or (colPickMode==1 and !item.containsKey('customerId'))">
                                        when a.id=#{item.id} then #{item.customerId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('customerIdIncrement')) or (colPickMode==1 and !item.containsKey('customerIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.customerId,0) + #{item.customerIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>

                <trim prefix="createTime=(case" suffix="ELSE createTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
                            when a.id=#{item.id} then #{item.createTime}
                        </if>
                    </foreach>
                </trim>

                        <trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
                                        when a.id=#{item.id} then #{item.createUserId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>

                <trim prefix="createUserName=(case" suffix="ELSE createUserName end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('createUserName')) or (colPickMode==1 and !item.containsKey('createUserName'))">
                            when a.id=#{item.id} then #{item.createUserName}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="lastLoginTime=(case" suffix="ELSE lastLoginTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('lastLoginTime')) or (colPickMode==1 and !item.containsKey('lastLoginTime'))">
                            when a.id=#{item.id} then #{item.lastLoginTime}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="lastLoginAddress=(case" suffix="ELSE lastLoginAddress end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('lastLoginAddress')) or (colPickMode==1 and !item.containsKey('lastLoginAddress'))">
                            when a.id=#{item.id} then #{item.lastLoginAddress}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="lastModPwdTime=(case" suffix="ELSE lastModPwdTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('lastModPwdTime')) or (colPickMode==1 and !item.containsKey('lastModPwdTime'))">
                            when a.id=#{item.id} then #{item.lastModPwdTime}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="lastModPwdAddr=(case" suffix="ELSE lastModPwdAddr end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('lastModPwdAddr')) or (colPickMode==1 and !item.containsKey('lastModPwdAddr'))">
                            when a.id=#{item.id} then #{item.lastModPwdAddr}
                        </if>
                    </foreach>
                </trim>
        </trim>
        where id in
        <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
            #{item.id}
        </foreach>
    </update>
    <!-- 根据主健查询 -->
    <select id="getByKey" parameterType="paramDto" resultMap="UserEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_user as a
        where a.id=#{condition.id}
    </select>
    <!-- 根据主健删除 -->
    <delete id="deleteByKey" parameterType="paramDto">
        delete a.* from mortals_xhx_user as a where a.id=#{condition.id}
    </delete>
    <!-- 根据主健删除一批，针对单一主健有效 -->
    <delete id="deleteByKeys">
        delete from mortals_xhx_user where id in
        <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>
    <!-- 根据paramDto删除一批 -->
    <delete id="deleteByMap" parameterType="paramDto">
        delete a.* from mortals_xhx_user as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </delete>
    <!-- 获取列表 -->
    <select id="getList" parameterType="paramDto" resultMap="UserEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_user as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
        <include refid="_orderCols_"/>
    </select>
    <!-- 获取 -->
    <select id="getListCount" parameterType="paramDto" resultType="int">
        select count(1)
        from mortals_xhx_user as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </select>
    <!-- 条件映射 -->
    <sql id="_condition_">
        <if test="condition != null and !condition.isEmpty()">
            <!-- 条件映射-普通条件 -->
            <include refid="_condition_param_">
                <property name="_conditionParam_" value="condition"/>
                <property name="_conditionType_" value="and"/>
            </include>
            <!-- 条件映射-集合之间使用AND，集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
            <if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
                and
                <foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
                    <trim prefixOverrides="or" prefix="(" suffix=")">
                        <include refid="_condition_param_">
                            <property name="_conditionParam_" value="andCondition"/>
                            <property name="_conditionType_" value="or"/>
                        </include>
                    </trim>
                </foreach>
            </if>
            <!-- 条件映射-集合之间使用OR，集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
            <if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
                and
                <foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
                    <trim prefixOverrides="and" prefix="(" suffix=")">
                        <include refid="_condition_param_">
                            <property name="_conditionParam_" value="orCondition"/>
                            <property name="_conditionType_" value="and"/>
                        </include>
                    </trim>
                </foreach>
            </if>
        </if>
    </sql>
    <!-- 条件映射-代参数 -->
    <sql id="_condition_param_">
        <bind name="conditionParamRef" value="${_conditionParam_}"/>

        <if test="conditionParamRef.containsKey('id')">
            <if test="conditionParamRef.id != null">
                ${_conditionType_} a.id=#{${_conditionParam_}.id}
            </if>
        </if>
            <if test="conditionParamRef.containsKey('id')">
                <if test="conditionParamRef.id != null ">
                    ${_conditionType_} a.id = #{${_conditionParam_}.id}
                </if>
                <if test="conditionParamRef.id == null">
                    ${_conditionType_} a.id is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('idList')">
                ${_conditionType_} a.id in
                <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
                ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
            </if>
            <if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
                ${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
            </if>


            <if test="conditionParamRef.containsKey('loginName')">
                <if test="conditionParamRef.loginName != null and conditionParamRef.loginName != ''">
                    ${_conditionType_} a.loginName like #{${_conditionParam_}.loginName}
                </if>
                <if test="conditionParamRef.loginName == null">
                    ${_conditionType_} a.loginName is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('loginNameList')">
                ${_conditionType_} a.loginName in
                <foreach collection="conditionParamRef.loginNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('loginPwd')">
                <if test="conditionParamRef.loginPwd != null and conditionParamRef.loginPwd != ''">
                    ${_conditionType_} a.loginPwd like #{${_conditionParam_}.loginPwd}
                </if>
                <if test="conditionParamRef.loginPwd == null">
                    ${_conditionType_} a.loginPwd is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('loginPwdList')">
                ${_conditionType_} a.loginPwd in
                <foreach collection="conditionParamRef.loginPwdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('loginPwd1')">
                <if test="conditionParamRef.loginPwd1 != null and conditionParamRef.loginPwd1 != ''">
                    ${_conditionType_} a.loginPwd1 like #{${_conditionParam_}.loginPwd1}
                </if>
                <if test="conditionParamRef.loginPwd1 == null">
                    ${_conditionType_} a.loginPwd1 is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('loginPwd1List')">
                ${_conditionType_} a.loginPwd1 in
                <foreach collection="conditionParamRef.loginPwd1List" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('loginPwd2')">
                <if test="conditionParamRef.loginPwd2 != null and conditionParamRef.loginPwd2 != ''">
                    ${_conditionType_} a.loginPwd2 like #{${_conditionParam_}.loginPwd2}
                </if>
                <if test="conditionParamRef.loginPwd2 == null">
                    ${_conditionType_} a.loginPwd2 is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('loginPwd2List')">
                ${_conditionType_} a.loginPwd2 in
                <foreach collection="conditionParamRef.loginPwd2List" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('loginPwd3')">
                <if test="conditionParamRef.loginPwd3 != null and conditionParamRef.loginPwd3 != ''">
                    ${_conditionType_} a.loginPwd3 like #{${_conditionParam_}.loginPwd3}
                </if>
                <if test="conditionParamRef.loginPwd3 == null">
                    ${_conditionType_} a.loginPwd3 is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('loginPwd3List')">
                ${_conditionType_} a.loginPwd3 in
                <foreach collection="conditionParamRef.loginPwd3List" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('loginLimitAddress')">
                <if test="conditionParamRef.loginLimitAddress != null and conditionParamRef.loginLimitAddress != ''">
                    ${_conditionType_} a.loginLimitAddress like #{${_conditionParam_}.loginLimitAddress}
                </if>
                <if test="conditionParamRef.loginLimitAddress == null">
                    ${_conditionType_} a.loginLimitAddress is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('loginLimitAddressList')">
                ${_conditionType_} a.loginLimitAddress in
                <foreach collection="conditionParamRef.loginLimitAddressList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('realName')">
                <if test="conditionParamRef.realName != null and conditionParamRef.realName != ''">
                    ${_conditionType_} a.realName like #{${_conditionParam_}.realName}
                </if>
                <if test="conditionParamRef.realName == null">
                    ${_conditionType_} a.realName is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('realNameList')">
                ${_conditionType_} a.realName in
                <foreach collection="conditionParamRef.realNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('mobile')">
                <if test="conditionParamRef.mobile != null and conditionParamRef.mobile != ''">
                    ${_conditionType_} a.mobile like #{${_conditionParam_}.mobile}
                </if>
                <if test="conditionParamRef.mobile == null">
                    ${_conditionType_} a.mobile is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('mobileList')">
                ${_conditionType_} a.mobile in
                <foreach collection="conditionParamRef.mobileList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('phone')">
                <if test="conditionParamRef.phone != null and conditionParamRef.phone != ''">
                    ${_conditionType_} a.phone like #{${_conditionParam_}.phone}
                </if>
                <if test="conditionParamRef.phone == null">
                    ${_conditionType_} a.phone is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('phoneList')">
                ${_conditionType_} a.phone in
                <foreach collection="conditionParamRef.phoneList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('email')">
                <if test="conditionParamRef.email != null and conditionParamRef.email != ''">
                    ${_conditionType_} a.email like #{${_conditionParam_}.email}
                </if>
                <if test="conditionParamRef.email == null">
                    ${_conditionType_} a.email is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('emailList')">
                ${_conditionType_} a.email in
                <foreach collection="conditionParamRef.emailList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('qq')">
                <if test="conditionParamRef.qq != null and conditionParamRef.qq != ''">
                    ${_conditionType_} a.qq like #{${_conditionParam_}.qq}
                </if>
                <if test="conditionParamRef.qq == null">
                    ${_conditionType_} a.qq is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('qqList')">
                ${_conditionType_} a.qq in
                <foreach collection="conditionParamRef.qqList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('userType')">
                <if test="conditionParamRef.userType != null ">
                    ${_conditionType_} a.userType = #{${_conditionParam_}.userType}
                </if>
                <if test="conditionParamRef.userType == null">
                    ${_conditionType_} a.userType is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('userTypeList')">
                ${_conditionType_} a.userType in
                <foreach collection="conditionParamRef.userTypeList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('userTypeStart') and conditionParamRef.userTypeStart != null">
                ${_conditionType_} a.userType <![CDATA[ >= ]]> #{${_conditionParam_}.userTypeStart}
            </if>
            <if test="conditionParamRef.containsKey('userTypeEnd') and conditionParamRef.userTypeEnd != null">
                ${_conditionType_} a.userType <![CDATA[ <= ]]> #{${_conditionParam_}.userTypeEnd}
            </if>

            <if test="conditionParamRef.containsKey('siteId')">
                <if test="conditionParamRef.siteId != null ">
                    ${_conditionType_} a.siteId = #{${_conditionParam_}.siteId}
                </if>
                <if test="conditionParamRef.siteId == null">
                    ${_conditionType_} a.siteId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('siteIdList')">
                ${_conditionType_} a.siteId in
                <foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('siteIdStart') and conditionParamRef.siteIdStart != null">
                ${_conditionType_} a.siteId <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart}
            </if>
            <if test="conditionParamRef.containsKey('siteIdEnd') and conditionParamRef.siteIdEnd != null">
                ${_conditionType_} a.siteId <![CDATA[ <= ]]> #{${_conditionParam_}.siteIdEnd}
            </if>

            <if test="conditionParamRef.containsKey('status')">
                <if test="conditionParamRef.status != null ">
                    ${_conditionType_} a.status = #{${_conditionParam_}.status}
                </if>
                <if test="conditionParamRef.status == null">
                    ${_conditionType_} a.status is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('statusList')">
                ${_conditionType_} a.status in
                <foreach collection="conditionParamRef.statusList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('statusStart') and conditionParamRef.statusStart != null">
                ${_conditionType_} a.status <![CDATA[ >= ]]> #{${_conditionParam_}.statusStart}
            </if>
            <if test="conditionParamRef.containsKey('statusEnd') and conditionParamRef.statusEnd != null">
                ${_conditionType_} a.status <![CDATA[ <= ]]> #{${_conditionParam_}.statusEnd}
            </if>

            <if test="conditionParamRef.containsKey('customerId')">
                <if test="conditionParamRef.customerId != null ">
                    ${_conditionType_} a.customerId = #{${_conditionParam_}.customerId}
                </if>
                <if test="conditionParamRef.customerId == null">
                    ${_conditionType_} a.customerId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('customerIdList')">
                ${_conditionType_} a.customerId in
                <foreach collection="conditionParamRef.customerIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('customerIdStart') and conditionParamRef.customerIdStart != null">
                ${_conditionType_} a.customerId <![CDATA[ >= ]]> #{${_conditionParam_}.customerIdStart}
            </if>
            <if test="conditionParamRef.containsKey('customerIdEnd') and conditionParamRef.customerIdEnd != null">
                ${_conditionType_} a.customerId <![CDATA[ <= ]]> #{${_conditionParam_}.customerIdEnd}
            </if>


            <if test="conditionParamRef.containsKey('createTime')">
                <if test="conditionParamRef.createTime != null ">
                    ${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
                </if>
                <if test="conditionParamRef.createTime == null">
                    ${_conditionType_} a.createTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
                ${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
                ${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('createUserId')">
                <if test="conditionParamRef.createUserId != null ">
                    ${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
                </if>
                <if test="conditionParamRef.createUserId == null">
                    ${_conditionType_} a.createUserId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('createUserIdList')">
                ${_conditionType_} a.createUserId in
                <foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
                ${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
            </if>
            <if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
                ${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
            </if>


            <if test="conditionParamRef.containsKey('createUserName')">
                <if test="conditionParamRef.createUserName != null and conditionParamRef.createUserName != ''">
                    ${_conditionType_} a.createUserName like #{${_conditionParam_}.createUserName}
                </if>
                <if test="conditionParamRef.createUserName == null">
                    ${_conditionType_} a.createUserName is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('createUserNameList')">
                ${_conditionType_} a.createUserName in
                <foreach collection="conditionParamRef.createUserNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('lastLoginTime')">
                <if test="conditionParamRef.lastLoginTime != null ">
                    ${_conditionType_} a.lastLoginTime = #{${_conditionParam_}.lastLoginTime}
                </if>
                <if test="conditionParamRef.lastLoginTime == null">
                    ${_conditionType_} a.lastLoginTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('lastLoginTimeStart') and conditionParamRef.lastLoginTimeStart != null and conditionParamRef.lastLoginTimeStart!=''">
                ${_conditionType_} a.lastLoginTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.lastLoginTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('lastLoginTimeEnd') and conditionParamRef.lastLoginTimeEnd != null and conditionParamRef.lastLoginTimeEnd!=''">
                ${_conditionType_} a.lastLoginTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.lastLoginTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('lastLoginAddress')">
                <if test="conditionParamRef.lastLoginAddress != null and conditionParamRef.lastLoginAddress != ''">
                    ${_conditionType_} a.lastLoginAddress like #{${_conditionParam_}.lastLoginAddress}
                </if>
                <if test="conditionParamRef.lastLoginAddress == null">
                    ${_conditionType_} a.lastLoginAddress is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('lastLoginAddressList')">
                ${_conditionType_} a.lastLoginAddress in
                <foreach collection="conditionParamRef.lastLoginAddressList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('lastModPwdTime')">
                <if test="conditionParamRef.lastModPwdTime != null ">
                    ${_conditionType_} a.lastModPwdTime = #{${_conditionParam_}.lastModPwdTime}
                </if>
                <if test="conditionParamRef.lastModPwdTime == null">
                    ${_conditionType_} a.lastModPwdTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('lastModPwdTimeStart') and conditionParamRef.lastModPwdTimeStart != null and conditionParamRef.lastModPwdTimeStart!=''">
                ${_conditionType_} a.lastModPwdTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.lastModPwdTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('lastModPwdTimeEnd') and conditionParamRef.lastModPwdTimeEnd != null and conditionParamRef.lastModPwdTimeEnd!=''">
                ${_conditionType_} a.lastModPwdTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.lastModPwdTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('lastModPwdAddr')">
                <if test="conditionParamRef.lastModPwdAddr != null and conditionParamRef.lastModPwdAddr != ''">
                    ${_conditionType_} a.lastModPwdAddr like #{${_conditionParam_}.lastModPwdAddr}
                </if>
                <if test="conditionParamRef.lastModPwdAddr == null">
                    ${_conditionType_} a.lastModPwdAddr is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('lastModPwdAddrList')">
                ${_conditionType_} a.lastModPwdAddr in
                <foreach collection="conditionParamRef.lastModPwdAddrList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
    </sql>
    <sql id="_orderCols_">
        <if test="orderColList != null and !orderColList.isEmpty()">
            order by
            <trim suffixOverrides=","  suffix="">
                <foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
                     ${item.colName} ${item.sortKind}
                </foreach>
            </trim>
        </if>
        <if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
            order by
            <trim suffixOverrides=","  suffix="">
                    <if test="orderCol.containsKey('id')">
                        a.id
                        <if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('loginName')">
                        a.loginName
                        <if test='orderCol.loginName != null and "DESC".equalsIgnoreCase(orderCol.loginName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('loginPwd')">
                        a.loginPwd
                        <if test='orderCol.loginPwd != null and "DESC".equalsIgnoreCase(orderCol.loginPwd)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('loginPwd1')">
                        a.loginPwd1
                        <if test='orderCol.loginPwd1 != null and "DESC".equalsIgnoreCase(orderCol.loginPwd1)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('loginPwd2')">
                        a.loginPwd2
                        <if test='orderCol.loginPwd2 != null and "DESC".equalsIgnoreCase(orderCol.loginPwd2)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('loginPwd3')">
                        a.loginPwd3
                        <if test='orderCol.loginPwd3 != null and "DESC".equalsIgnoreCase(orderCol.loginPwd3)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('loginLimitAddress')">
                        a.loginLimitAddress
                        <if test='orderCol.loginLimitAddress != null and "DESC".equalsIgnoreCase(orderCol.loginLimitAddress)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('realName')">
                        a.realName
                        <if test='orderCol.realName != null and "DESC".equalsIgnoreCase(orderCol.realName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('mobile')">
                        a.mobile
                        <if test='orderCol.mobile != null and "DESC".equalsIgnoreCase(orderCol.mobile)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('phone')">
                        a.phone
                        <if test='orderCol.phone != null and "DESC".equalsIgnoreCase(orderCol.phone)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('email')">
                        a.email
                        <if test='orderCol.email != null and "DESC".equalsIgnoreCase(orderCol.email)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('qq')">
                        a.qq
                        <if test='orderCol.qq != null and "DESC".equalsIgnoreCase(orderCol.qq)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('userType')">
                        a.userType
                        <if test='orderCol.userType != null and "DESC".equalsIgnoreCase(orderCol.userType)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('siteId')">
                        a.siteId
                        <if test='orderCol.siteId != null and "DESC".equalsIgnoreCase(orderCol.siteId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('status')">
                        a.status
                        <if test='orderCol.status != null and "DESC".equalsIgnoreCase(orderCol.status)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('customerId')">
                        a.customerId
                        <if test='orderCol.customerId != null and "DESC".equalsIgnoreCase(orderCol.customerId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('createTime')">
                        a.createTime
                        <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('createUserId')">
                        a.createUserId
                        <if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('createUserName')">
                        a.createUserName
                        <if test='orderCol.createUserName != null and "DESC".equalsIgnoreCase(orderCol.createUserName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('lastLoginTime')">
                        a.lastLoginTime
                        <if test='orderCol.lastLoginTime != null and "DESC".equalsIgnoreCase(orderCol.lastLoginTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('lastLoginAddress')">
                        a.lastLoginAddress
                        <if test='orderCol.lastLoginAddress != null and "DESC".equalsIgnoreCase(orderCol.lastLoginAddress)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('lastModPwdTime')">
                        a.lastModPwdTime
                        <if test='orderCol.lastModPwdTime != null and "DESC".equalsIgnoreCase(orderCol.lastModPwdTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('lastModPwdAddr')">
                        a.lastModPwdAddr
                        <if test='orderCol.lastModPwdAddr != null and "DESC".equalsIgnoreCase(orderCol.lastModPwdAddr)'>DESC</if>
                        ,
                    </if>
            </trim>
        </if>
    </sql>
    <sql id="_group_by_">
        <if test="groupList != null and !groupList.isEmpty()">
            GROUP BY
            <trim suffixOverrides=","  suffix="">
                <foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
                    ${item}
                </foreach>
            </trim>
        </if>
    </sql>
</mapper>