<?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.site.dao.ibatis.SiteDaoImpl">

    <!-- 字段和属性映射 -->
    <resultMap type="SiteEntity" id="SiteEntity-Map">
        <result property="id" column="id" />
        <result property="siteName" column="siteName" />
        <result property="parentId" column="parentId" />
        <result property="ancestors" column="ancestors" />
        <result property="address" column="address" />
        <result property="mobile" column="mobile" />
        <result property="introduce" column="introduce" />
        <result property="workday1" column="workday1" />
        <result property="workday2" column="workday2" />
        <result property="workday3" column="workday3" />
        <result property="workday4" column="workday4" />
        <result property="workday5" column="workday5" />
        <result property="workday6" column="workday6" />
        <result property="workday7" column="workday7" />
        <result property="number" column="number" />
        <result property="summary" column="summary" />
        <result property="orderNum" column="orderNum" />
        <result property="status" column="status" />
        <result property="updateTime" column="updateTime" />
        <result property="updateUser" column="updateUser" />
        <result property="createTime" column="createTime" />
        <result property="createUser" column="createUser" />
    </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('siteName') or colPickMode == 1 and data.containsKey('siteName')))">
                    a.siteName as siteName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('parentId') or colPickMode == 1 and data.containsKey('parentId')))">
                    a.parentId as parentId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('ancestors') or colPickMode == 1 and data.containsKey('ancestors')))">
                    a.ancestors as ancestors,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('address') or colPickMode == 1 and data.containsKey('address')))">
                    a.address as address,
                </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('introduce') or colPickMode == 1 and data.containsKey('introduce')))">
                    a.introduce as introduce,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workday1') or colPickMode == 1 and data.containsKey('workday1')))">
                    a.workday1 as workday1,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workday2') or colPickMode == 1 and data.containsKey('workday2')))">
                    a.workday2 as workday2,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workday3') or colPickMode == 1 and data.containsKey('workday3')))">
                    a.workday3 as workday3,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workday4') or colPickMode == 1 and data.containsKey('workday4')))">
                    a.workday4 as workday4,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workday5') or colPickMode == 1 and data.containsKey('workday5')))">
                    a.workday5 as workday5,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workday6') or colPickMode == 1 and data.containsKey('workday6')))">
                    a.workday6 as workday6,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workday7') or colPickMode == 1 and data.containsKey('workday7')))">
                    a.workday7 as workday7,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('number') or colPickMode == 1 and data.containsKey('number')))">
                    a.number as number,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('summary') or colPickMode == 1 and data.containsKey('summary')))">
                    a.summary as summary,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('orderNum') or colPickMode == 1 and data.containsKey('orderNum')))">
                    a.orderNum as orderNum,
                </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('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
                    a.updateTime as updateTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUser') or colPickMode == 1 and data.containsKey('updateUser')))">
                    a.updateUser as updateUser,
                </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('createUser') or colPickMode == 1 and data.containsKey('createUser')))">
                    a.createUser as createUser,
                </if>
        </trim>
    </sql>
    <!-- 新增 -->
        <insert id="insert" parameterType="SiteEntity" useGeneratedKeys="true" keyProperty="id">
            insert into mortals_xhx_site
            (siteName,parentId,ancestors,address,mobile,introduce,workday1,workday2,workday3,workday4,workday5,workday6,workday7,number,summary,orderNum,status,updateTime,updateUser,createTime,createUser)
            VALUES
            (#{siteName},#{parentId},#{ancestors},#{address},#{mobile},#{introduce},#{workday1},#{workday2},#{workday3},#{workday4},#{workday5},#{workday6},#{workday7},#{number},#{summary},#{orderNum},#{status},#{updateTime},#{updateUser},#{createTime},#{createUser})
        </insert>

        <!-- 批量新增 -->
        <insert id="insertBatch" parameterType="paramDto">
            insert into mortals_xhx_site
            (siteName,parentId,ancestors,address,mobile,introduce,workday1,workday2,workday3,workday4,workday5,workday6,workday7,number,summary,orderNum,status,updateTime,updateUser,createTime,createUser)
            VALUES
            <foreach collection="data.dataList" item="item" index="index" separator="," >
                (#{item.siteName},#{item.parentId},#{item.ancestors},#{item.address},#{item.mobile},#{item.introduce},#{item.workday1},#{item.workday2},#{item.workday3},#{item.workday4},#{item.workday5},#{item.workday6},#{item.workday7},#{item.number},#{item.summary},#{item.orderNum},#{item.status},#{item.updateTime},#{item.updateUser},#{item.createTime},#{item.createUser})
            </foreach>
        </insert>
    <!-- 根据ParamDto更新 -->
    <update id="update" parameterType="paramDto">
        update mortals_xhx_site as a
        set
        <trim suffixOverrides="," suffix="">
            <if test="(colPickMode==0 and data.containsKey('siteName')) or (colPickMode==1 and !data.containsKey('siteName'))">
                a.siteName=#{data.siteName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('parentId')) or (colPickMode==1 and !data.containsKey('parentId'))">
                a.parentId=#{data.parentId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('parentIdIncrement')) or (colPickMode==1 and !data.containsKey('parentIdIncrement'))">
                a.parentId=ifnull(a.parentId,0) + #{data.parentIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('ancestors')) or (colPickMode==1 and !data.containsKey('ancestors'))">
                a.ancestors=#{data.ancestors},
            </if>
            <if test="(colPickMode==0 and data.containsKey('address')) or (colPickMode==1 and !data.containsKey('address'))">
                a.address=#{data.address},
            </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('introduce')) or (colPickMode==1 and !data.containsKey('introduce'))">
                a.introduce=#{data.introduce},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday1')) or (colPickMode==1 and !data.containsKey('workday1'))">
                a.workday1=#{data.workday1},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday1Increment')) or (colPickMode==1 and !data.containsKey('workday1Increment'))">
                a.workday1=ifnull(a.workday1,0) + #{data.workday1Increment},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday2')) or (colPickMode==1 and !data.containsKey('workday2'))">
                a.workday2=#{data.workday2},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday2Increment')) or (colPickMode==1 and !data.containsKey('workday2Increment'))">
                a.workday2=ifnull(a.workday2,0) + #{data.workday2Increment},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday3')) or (colPickMode==1 and !data.containsKey('workday3'))">
                a.workday3=#{data.workday3},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday3Increment')) or (colPickMode==1 and !data.containsKey('workday3Increment'))">
                a.workday3=ifnull(a.workday3,0) + #{data.workday3Increment},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday4')) or (colPickMode==1 and !data.containsKey('workday4'))">
                a.workday4=#{data.workday4},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday4Increment')) or (colPickMode==1 and !data.containsKey('workday4Increment'))">
                a.workday4=ifnull(a.workday4,0) + #{data.workday4Increment},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday5')) or (colPickMode==1 and !data.containsKey('workday5'))">
                a.workday5=#{data.workday5},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday5Increment')) or (colPickMode==1 and !data.containsKey('workday5Increment'))">
                a.workday5=ifnull(a.workday5,0) + #{data.workday5Increment},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday6')) or (colPickMode==1 and !data.containsKey('workday6'))">
                a.workday6=#{data.workday6},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday6Increment')) or (colPickMode==1 and !data.containsKey('workday6Increment'))">
                a.workday6=ifnull(a.workday6,0) + #{data.workday6Increment},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday7')) or (colPickMode==1 and !data.containsKey('workday7'))">
                a.workday7=#{data.workday7},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workday7Increment')) or (colPickMode==1 and !data.containsKey('workday7Increment'))">
                a.workday7=ifnull(a.workday7,0) + #{data.workday7Increment},
            </if>
            <if test="(colPickMode==0 and data.containsKey('number')) or (colPickMode==1 and !data.containsKey('number'))">
                a.number=#{data.number},
            </if>
            <if test="(colPickMode==0 and data.containsKey('summary')) or (colPickMode==1 and !data.containsKey('summary'))">
                a.summary=#{data.summary},
            </if>
            <if test="(colPickMode==0 and data.containsKey('orderNum')) or (colPickMode==1 and !data.containsKey('orderNum'))">
                a.orderNum=#{data.orderNum},
            </if>
            <if test="(colPickMode==0 and data.containsKey('orderNumIncrement')) or (colPickMode==1 and !data.containsKey('orderNumIncrement'))">
                a.orderNum=ifnull(a.orderNum,0) + #{data.orderNumIncrement},
            </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('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
                a.updateTime=#{data.updateTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateUser')) or (colPickMode==1 and !data.containsKey('updateUser'))">
                a.updateUser=#{data.updateUser},
            </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('createUser')) or (colPickMode==1 and !data.containsKey('createUser'))">
                a.createUser=#{data.createUser},
            </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_site as a
        <trim prefix="set" suffixOverrides=",">


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

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

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

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

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

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

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

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

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

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

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

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

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

                        <trim prefix="orderNum=(case" suffix="ELSE orderNum end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('orderNum')) or (colPickMode==1 and !item.containsKey('orderNum'))">
                                        when a.id=#{item.id} then #{item.orderNum}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('orderNumIncrement')) or (colPickMode==1 and !item.containsKey('orderNumIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.orderNum,0) + #{item.orderNumIncrement}
                                    </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="updateTime=(case" suffix="ELSE updateTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
                            when a.id=#{item.id} then #{item.updateTime}
                        </if>
                    </foreach>
                </trim>

                <trim prefix="updateUser=(case" suffix="ELSE updateUser end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('updateUser')) or (colPickMode==1 and !item.containsKey('updateUser'))">
                            when a.id=#{item.id} then #{item.updateUser}
                        </if>
                    </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="createUser=(case" suffix="ELSE createUser end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('createUser')) or (colPickMode==1 and !item.containsKey('createUser'))">
                            when a.id=#{item.id} then #{item.createUser}
                        </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="SiteEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_site as a
        where a.id=#{condition.id}
    </select>
    <!-- 根据主健删除 -->
    <delete id="deleteByKey" parameterType="paramDto">
        delete a.* from mortals_xhx_site as a where a.id=#{condition.id}
    </delete>
    <!-- 根据主健删除一批，针对单一主健有效 -->
    <delete id="deleteByKeys">
        delete from mortals_xhx_site 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_site as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </delete>
    <!-- 获取列表 -->
    <select id="getList" parameterType="paramDto" resultMap="SiteEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_site 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_site 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('siteName')">
                <if test="conditionParamRef.siteName != null and conditionParamRef.siteName != ''">
                    ${_conditionType_} a.siteName like #{${_conditionParam_}.siteName}
                </if>
                <if test="conditionParamRef.siteName == null">
                    ${_conditionType_} a.siteName is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('siteNameList')">
                ${_conditionType_} a.siteName in
                <foreach collection="conditionParamRef.siteNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('parentId')">
                <if test="conditionParamRef.parentId != null ">
                    ${_conditionType_} a.parentId = #{${_conditionParam_}.parentId}
                </if>
                <if test="conditionParamRef.parentId == null">
                    ${_conditionType_} a.parentId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('parentIdList')">
                ${_conditionType_} a.parentId in
                <foreach collection="conditionParamRef.parentIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('parentIdStart') and conditionParamRef.parentIdStart != null">
                ${_conditionType_} a.parentId <![CDATA[ >= ]]> #{${_conditionParam_}.parentIdStart}
            </if>
            <if test="conditionParamRef.containsKey('parentIdEnd') and conditionParamRef.parentIdEnd != null">
                ${_conditionType_} a.parentId <![CDATA[ <= ]]> #{${_conditionParam_}.parentIdEnd}
            </if>


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

            <if test="conditionParamRef.containsKey('address')">
                <if test="conditionParamRef.address != null and conditionParamRef.address != ''">
                    ${_conditionType_} a.address like #{${_conditionParam_}.address}
                </if>
                <if test="conditionParamRef.address == null">
                    ${_conditionType_} a.address is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('addressList')">
                ${_conditionType_} a.address in
                <foreach collection="conditionParamRef.addressList" 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('introduce')">
                <if test="conditionParamRef.introduce != null and conditionParamRef.introduce != ''">
                    ${_conditionType_} a.introduce like #{${_conditionParam_}.introduce}
                </if>
                <if test="conditionParamRef.introduce == null">
                    ${_conditionType_} a.introduce is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('introduceList')">
                ${_conditionType_} a.introduce in
                <foreach collection="conditionParamRef.introduceList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('workday1')">
                <if test="conditionParamRef.workday1 != null ">
                    ${_conditionType_} a.workday1 = #{${_conditionParam_}.workday1}
                </if>
                <if test="conditionParamRef.workday1 == null">
                    ${_conditionType_} a.workday1 is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('workday1List')">
                ${_conditionType_} a.workday1 in
                <foreach collection="conditionParamRef.workday1List" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('workday1Start') and conditionParamRef.workday1Start != null">
                ${_conditionType_} a.workday1 <![CDATA[ >= ]]> #{${_conditionParam_}.workday1Start}
            </if>
            <if test="conditionParamRef.containsKey('workday1End') and conditionParamRef.workday1End != null">
                ${_conditionType_} a.workday1 <![CDATA[ <= ]]> #{${_conditionParam_}.workday1End}
            </if>

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

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

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

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

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

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


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

            <if test="conditionParamRef.containsKey('summary')">
                <if test="conditionParamRef.summary != null and conditionParamRef.summary != ''">
                    ${_conditionType_} a.summary like #{${_conditionParam_}.summary}
                </if>
                <if test="conditionParamRef.summary == null">
                    ${_conditionType_} a.summary is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('summaryList')">
                ${_conditionType_} a.summary in
                <foreach collection="conditionParamRef.summaryList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('orderNum')">
                <if test="conditionParamRef.orderNum != null ">
                    ${_conditionType_} a.orderNum = #{${_conditionParam_}.orderNum}
                </if>
                <if test="conditionParamRef.orderNum == null">
                    ${_conditionType_} a.orderNum is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('orderNumList')">
                ${_conditionType_} a.orderNum in
                <foreach collection="conditionParamRef.orderNumList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('orderNumStart') and conditionParamRef.orderNumStart != null">
                ${_conditionType_} a.orderNum <![CDATA[ >= ]]> #{${_conditionParam_}.orderNumStart}
            </if>
            <if test="conditionParamRef.containsKey('orderNumEnd') and conditionParamRef.orderNumEnd != null">
                ${_conditionType_} a.orderNum <![CDATA[ <= ]]> #{${_conditionParam_}.orderNumEnd}
            </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('updateTime')">
                <if test="conditionParamRef.updateTime != null ">
                    ${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
                </if>
                <if test="conditionParamRef.updateTime == null">
                    ${_conditionType_} a.updateTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
                ${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
                ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('updateUser')">
                <if test="conditionParamRef.updateUser != null and conditionParamRef.updateUser != ''">
                    ${_conditionType_} a.updateUser like #{${_conditionParam_}.updateUser}
                </if>
                <if test="conditionParamRef.updateUser == null">
                    ${_conditionType_} a.updateUser is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('updateUserList')">
                ${_conditionType_} a.updateUser in
                <foreach collection="conditionParamRef.updateUserList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </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('createUser')">
                <if test="conditionParamRef.createUser != null and conditionParamRef.createUser != ''">
                    ${_conditionType_} a.createUser like #{${_conditionParam_}.createUser}
                </if>
                <if test="conditionParamRef.createUser == null">
                    ${_conditionType_} a.createUser is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('createUserList')">
                ${_conditionType_} a.createUser in
                <foreach collection="conditionParamRef.createUserList" 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('siteName')">
                        a.siteName
                        <if test='orderCol.siteName != null and "DESC".equalsIgnoreCase(orderCol.siteName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('parentId')">
                        a.parentId
                        <if test='orderCol.parentId != null and "DESC".equalsIgnoreCase(orderCol.parentId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('ancestors')">
                        a.ancestors
                        <if test='orderCol.ancestors != null and "DESC".equalsIgnoreCase(orderCol.ancestors)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('address')">
                        a.address
                        <if test='orderCol.address != null and "DESC".equalsIgnoreCase(orderCol.address)'>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('introduce')">
                        a.introduce
                        <if test='orderCol.introduce != null and "DESC".equalsIgnoreCase(orderCol.introduce)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workday1')">
                        a.workday1
                        <if test='orderCol.workday1 != null and "DESC".equalsIgnoreCase(orderCol.workday1)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workday2')">
                        a.workday2
                        <if test='orderCol.workday2 != null and "DESC".equalsIgnoreCase(orderCol.workday2)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workday3')">
                        a.workday3
                        <if test='orderCol.workday3 != null and "DESC".equalsIgnoreCase(orderCol.workday3)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workday4')">
                        a.workday4
                        <if test='orderCol.workday4 != null and "DESC".equalsIgnoreCase(orderCol.workday4)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workday5')">
                        a.workday5
                        <if test='orderCol.workday5 != null and "DESC".equalsIgnoreCase(orderCol.workday5)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workday6')">
                        a.workday6
                        <if test='orderCol.workday6 != null and "DESC".equalsIgnoreCase(orderCol.workday6)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workday7')">
                        a.workday7
                        <if test='orderCol.workday7 != null and "DESC".equalsIgnoreCase(orderCol.workday7)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('number')">
                        a.number
                        <if test='orderCol.number != null and "DESC".equalsIgnoreCase(orderCol.number)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('summary')">
                        a.summary
                        <if test='orderCol.summary != null and "DESC".equalsIgnoreCase(orderCol.summary)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('orderNum')">
                        a.orderNum
                        <if test='orderCol.orderNum != null and "DESC".equalsIgnoreCase(orderCol.orderNum)'>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('updateTime')">
                        a.updateTime
                        <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('updateUser')">
                        a.updateUser
                        <if test='orderCol.updateUser != null and "DESC".equalsIgnoreCase(orderCol.updateUser)'>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('createUser')">
                        a.createUser
                        <if test='orderCol.createUser != null and "DESC".equalsIgnoreCase(orderCol.createUser)'>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>