<?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.module.attendance.dao.ibatis.AttendanceGroupFixedworkDaoImpl">

    <!-- 字段和属性映射 -->
    <resultMap type="AttendanceGroupFixedworkEntity" id="AttendanceGroupFixedworkEntity-Map">
        <id  property="id" column="id" />
        <result property="groupId" column="groupId" />
        <result property="groupName" column="groupName" />
        <result property="monday" column="monday" />
        <result property="mondayClassId" column="mondayClassId" />
        <result property="mondayClassName" column="mondayClassName" />
        <result property="tuesday" column="tuesday" />
        <result property="tuesdayClassId" column="tuesdayClassId" />
        <result property="tuesdayClassName" column="tuesdayClassName" />
        <result property="wednesday" column="wednesday" />
        <result property="wednesdayClassId" column="wednesdayClassId" />
        <result property="wednesdayClassName" column="wednesdayClassName" />
        <result property="thursday" column="thursday" />
        <result property="thursdayClassId" column="thursdayClassId" />
        <result property="thursdayClassName" column="thursdayClassName" />
        <result property="friday" column="friday" />
        <result property="fridayClassId" column="fridayClassId" />
        <result property="fridayClassName" column="fridayClassName" />
        <result property="saturday" column="saturday" />
        <result property="saturdayClassId" column="saturdayClassId" />
        <result property="saturdayClassName" column="saturdayClassName" />
        <result property="sunday" column="sunday" />
        <result property="sundayClassId" column="sundayClassId" />
        <result property="sundayClassName" column="sundayClassName" />
        <result property="holidays" column="holidays" />
        <result property="remark" column="remark" />
        <result property="createUserId" column="createUserId" />
        <result property="createTime" column="createTime" />
        <result property="updateUserId" column="updateUserId" />
        <result property="updateTime" column="updateTime" />
        <collection property="attendanceGroupFixedworkSpecialList" column="id" ofType="AttendanceGroupFixedworkSpecialEntity" javaType="ArrayList" select="getAttendanceGroupFixedworkSpecialByFixedWorkId"></collection>
    </resultMap>
    <resultMap type="AttendanceGroupFixedworkSpecialEntity" id="AttendanceGroupFixedworkSpecialEntity-Map">
        <result property="id" column="id" />
        <result property="fixedWorkId" column="fixedWorkId" />
        <result property="must" column="must" />
        <result property="classId" column="classId" />
        <result property="className" column="className" />
        <result property="addWay" column="addWay" />
        <result property="specialTime" column="specialTime" />
        <result property="specialTimeStart" column="specialTimeStart" />
        <result property="specialTimeEnd" column="specialTimeEnd" />
        <result property="remark" column="remark" />
        <result property="createUserId" column="createUserId" />
        <result property="createTime" column="createTime" />
        <result property="updateUserId" column="updateUserId" />
        <result property="updateTime" column="updateTime" />
    </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,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('groupId') or colPickMode == 1 and data.containsKey('groupId')))">
                a.groupId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('groupName') or colPickMode == 1 and data.containsKey('groupName')))">
                a.groupName,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('monday') or colPickMode == 1 and data.containsKey('monday')))">
                a.monday,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('mondayClassId') or colPickMode == 1 and data.containsKey('mondayClassId')))">
                a.mondayClassId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('mondayClassName') or colPickMode == 1 and data.containsKey('mondayClassName')))">
                a.mondayClassName,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('tuesday') or colPickMode == 1 and data.containsKey('tuesday')))">
                a.tuesday,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('tuesdayClassId') or colPickMode == 1 and data.containsKey('tuesdayClassId')))">
                a.tuesdayClassId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('tuesdayClassName') or colPickMode == 1 and data.containsKey('tuesdayClassName')))">
                a.tuesdayClassName,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('wednesday') or colPickMode == 1 and data.containsKey('wednesday')))">
                a.wednesday,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('wednesdayClassId') or colPickMode == 1 and data.containsKey('wednesdayClassId')))">
                a.wednesdayClassId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('wednesdayClassName') or colPickMode == 1 and data.containsKey('wednesdayClassName')))">
                a.wednesdayClassName,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('thursday') or colPickMode == 1 and data.containsKey('thursday')))">
                a.thursday,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('thursdayClassId') or colPickMode == 1 and data.containsKey('thursdayClassId')))">
                a.thursdayClassId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('thursdayClassName') or colPickMode == 1 and data.containsKey('thursdayClassName')))">
                a.thursdayClassName,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('friday') or colPickMode == 1 and data.containsKey('friday')))">
                a.friday,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('fridayClassId') or colPickMode == 1 and data.containsKey('fridayClassId')))">
                a.fridayClassId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('fridayClassName') or colPickMode == 1 and data.containsKey('fridayClassName')))">
                a.fridayClassName,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('saturday') or colPickMode == 1 and data.containsKey('saturday')))">
                a.saturday,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('saturdayClassId') or colPickMode == 1 and data.containsKey('saturdayClassId')))">
                a.saturdayClassId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('saturdayClassName') or colPickMode == 1 and data.containsKey('saturdayClassName')))">
                a.saturdayClassName,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sunday') or colPickMode == 1 and data.containsKey('sunday')))">
                a.sunday,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sundayClassId') or colPickMode == 1 and data.containsKey('sundayClassId')))">
                a.sundayClassId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sundayClassName') or colPickMode == 1 and data.containsKey('sundayClassName')))">
                a.sundayClassName,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('holidays') or colPickMode == 1 and data.containsKey('holidays')))">
                a.holidays,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
                a.remark,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
                a.createUserId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
                a.createTime,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
                a.updateUserId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
                a.updateTime,
            </if>
        </trim>
    </sql>
    <!-- 子表所有列 -->
    <sql id="_columns_sub">
        <trim suffixOverrides="," suffix="">
            b.id,b.fixedWorkId,b.must,b.classId,b.className,b.addWay,b.specialTime,b.specialTimeStart,b.specialTimeEnd,b.remark,b.createUserId,b.createTime,b.updateUserId,b.updateTime,
        </trim>
    </sql>
    <!-- 新增 区分主键自增加还是业务插入 -->
    <insert id="insert" parameterType="AttendanceGroupFixedworkEntity"  useGeneratedKeys="true" keyProperty="id">
        insert into mortals_xhx_attendance_group_fixedwork
        (groupId,groupName,monday,mondayClassId,mondayClassName,tuesday,tuesdayClassId,tuesdayClassName,wednesday,wednesdayClassId,wednesdayClassName,thursday,thursdayClassId,thursdayClassName,friday,fridayClassId,fridayClassName,saturday,saturdayClassId,saturdayClassName,sunday,sundayClassId,sundayClassName,holidays,remark,createUserId,createTime,updateUserId,updateTime)
        VALUES
        (#{groupId},#{groupName},#{monday},#{mondayClassId},#{mondayClassName},#{tuesday},#{tuesdayClassId},#{tuesdayClassName},#{wednesday},#{wednesdayClassId},#{wednesdayClassName},#{thursday},#{thursdayClassId},#{thursdayClassName},#{friday},#{fridayClassId},#{fridayClassName},#{saturday},#{saturdayClassId},#{saturdayClassName},#{sunday},#{sundayClassId},#{sundayClassName},#{holidays},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
    </insert>

    <!-- 批量新增 -->
    <insert id="insertBatch" parameterType="paramDto">
        insert into mortals_xhx_attendance_group_fixedwork
        (groupId,groupName,monday,mondayClassId,mondayClassName,tuesday,tuesdayClassId,tuesdayClassName,wednesday,wednesdayClassId,wednesdayClassName,thursday,thursdayClassId,thursdayClassName,friday,fridayClassId,fridayClassName,saturday,saturdayClassId,saturdayClassName,sunday,sundayClassId,sundayClassName,holidays,remark,createUserId,createTime,updateUserId,updateTime)
        VALUES
        <foreach collection="data.dataList" item="item" index="index" separator="," >
            (#{item.groupId},#{item.groupName},#{item.monday},#{item.mondayClassId},#{item.mondayClassName},#{item.tuesday},#{item.tuesdayClassId},#{item.tuesdayClassName},#{item.wednesday},#{item.wednesdayClassId},#{item.wednesdayClassName},#{item.thursday},#{item.thursdayClassId},#{item.thursdayClassName},#{item.friday},#{item.fridayClassId},#{item.fridayClassName},#{item.saturday},#{item.saturdayClassId},#{item.saturdayClassName},#{item.sunday},#{item.sundayClassId},#{item.sundayClassName},#{item.holidays},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
        </foreach>
    </insert>


    <!-- 根据ParamDto更新 -->
    <update id="update" parameterType="paramDto">
        update mortals_xhx_attendance_group_fixedwork as a
        set
        <trim suffixOverrides="," suffix="">
            <if test="(colPickMode==0 and data.containsKey('groupId')) or (colPickMode==1 and !data.containsKey('groupId'))">
                a.groupId=#{data.groupId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('groupIdIncrement')) or (colPickMode==1 and !data.containsKey('groupIdIncrement'))">
                a.groupId=ifnull(a.groupId,0) + #{data.groupIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('groupName')) or (colPickMode==1 and !data.containsKey('groupName'))">
                a.groupName=#{data.groupName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('monday')) or (colPickMode==1 and !data.containsKey('monday'))">
                a.monday=#{data.monday},
            </if>
            <if test="(colPickMode==0 and data.containsKey('mondayIncrement')) or (colPickMode==1 and !data.containsKey('mondayIncrement'))">
                a.monday=ifnull(a.monday,0) + #{data.mondayIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('mondayClassId')) or (colPickMode==1 and !data.containsKey('mondayClassId'))">
                a.mondayClassId=#{data.mondayClassId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('mondayClassIdIncrement')) or (colPickMode==1 and !data.containsKey('mondayClassIdIncrement'))">
                a.mondayClassId=ifnull(a.mondayClassId,0) + #{data.mondayClassIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('mondayClassName')) or (colPickMode==1 and !data.containsKey('mondayClassName'))">
                a.mondayClassName=#{data.mondayClassName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('tuesday')) or (colPickMode==1 and !data.containsKey('tuesday'))">
                a.tuesday=#{data.tuesday},
            </if>
            <if test="(colPickMode==0 and data.containsKey('tuesdayIncrement')) or (colPickMode==1 and !data.containsKey('tuesdayIncrement'))">
                a.tuesday=ifnull(a.tuesday,0) + #{data.tuesdayIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('tuesdayClassId')) or (colPickMode==1 and !data.containsKey('tuesdayClassId'))">
                a.tuesdayClassId=#{data.tuesdayClassId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('tuesdayClassIdIncrement')) or (colPickMode==1 and !data.containsKey('tuesdayClassIdIncrement'))">
                a.tuesdayClassId=ifnull(a.tuesdayClassId,0) + #{data.tuesdayClassIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('tuesdayClassName')) or (colPickMode==1 and !data.containsKey('tuesdayClassName'))">
                a.tuesdayClassName=#{data.tuesdayClassName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('wednesday')) or (colPickMode==1 and !data.containsKey('wednesday'))">
                a.wednesday=#{data.wednesday},
            </if>
            <if test="(colPickMode==0 and data.containsKey('wednesdayIncrement')) or (colPickMode==1 and !data.containsKey('wednesdayIncrement'))">
                a.wednesday=ifnull(a.wednesday,0) + #{data.wednesdayIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('wednesdayClassId')) or (colPickMode==1 and !data.containsKey('wednesdayClassId'))">
                a.wednesdayClassId=#{data.wednesdayClassId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('wednesdayClassIdIncrement')) or (colPickMode==1 and !data.containsKey('wednesdayClassIdIncrement'))">
                a.wednesdayClassId=ifnull(a.wednesdayClassId,0) + #{data.wednesdayClassIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('wednesdayClassName')) or (colPickMode==1 and !data.containsKey('wednesdayClassName'))">
                a.wednesdayClassName=#{data.wednesdayClassName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('thursday')) or (colPickMode==1 and !data.containsKey('thursday'))">
                a.thursday=#{data.thursday},
            </if>
            <if test="(colPickMode==0 and data.containsKey('thursdayIncrement')) or (colPickMode==1 and !data.containsKey('thursdayIncrement'))">
                a.thursday=ifnull(a.thursday,0) + #{data.thursdayIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('thursdayClassId')) or (colPickMode==1 and !data.containsKey('thursdayClassId'))">
                a.thursdayClassId=#{data.thursdayClassId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('thursdayClassIdIncrement')) or (colPickMode==1 and !data.containsKey('thursdayClassIdIncrement'))">
                a.thursdayClassId=ifnull(a.thursdayClassId,0) + #{data.thursdayClassIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('thursdayClassName')) or (colPickMode==1 and !data.containsKey('thursdayClassName'))">
                a.thursdayClassName=#{data.thursdayClassName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('friday')) or (colPickMode==1 and !data.containsKey('friday'))">
                a.friday=#{data.friday},
            </if>
            <if test="(colPickMode==0 and data.containsKey('fridayIncrement')) or (colPickMode==1 and !data.containsKey('fridayIncrement'))">
                a.friday=ifnull(a.friday,0) + #{data.fridayIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('fridayClassId')) or (colPickMode==1 and !data.containsKey('fridayClassId'))">
                a.fridayClassId=#{data.fridayClassId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('fridayClassIdIncrement')) or (colPickMode==1 and !data.containsKey('fridayClassIdIncrement'))">
                a.fridayClassId=ifnull(a.fridayClassId,0) + #{data.fridayClassIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('fridayClassName')) or (colPickMode==1 and !data.containsKey('fridayClassName'))">
                a.fridayClassName=#{data.fridayClassName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('saturday')) or (colPickMode==1 and !data.containsKey('saturday'))">
                a.saturday=#{data.saturday},
            </if>
            <if test="(colPickMode==0 and data.containsKey('saturdayIncrement')) or (colPickMode==1 and !data.containsKey('saturdayIncrement'))">
                a.saturday=ifnull(a.saturday,0) + #{data.saturdayIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('saturdayClassId')) or (colPickMode==1 and !data.containsKey('saturdayClassId'))">
                a.saturdayClassId=#{data.saturdayClassId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('saturdayClassIdIncrement')) or (colPickMode==1 and !data.containsKey('saturdayClassIdIncrement'))">
                a.saturdayClassId=ifnull(a.saturdayClassId,0) + #{data.saturdayClassIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('saturdayClassName')) or (colPickMode==1 and !data.containsKey('saturdayClassName'))">
                a.saturdayClassName=#{data.saturdayClassName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('sunday')) or (colPickMode==1 and !data.containsKey('sunday'))">
                a.sunday=#{data.sunday},
            </if>
            <if test="(colPickMode==0 and data.containsKey('sundayIncrement')) or (colPickMode==1 and !data.containsKey('sundayIncrement'))">
                a.sunday=ifnull(a.sunday,0) + #{data.sundayIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('sundayClassId')) or (colPickMode==1 and !data.containsKey('sundayClassId'))">
                a.sundayClassId=#{data.sundayClassId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('sundayClassIdIncrement')) or (colPickMode==1 and !data.containsKey('sundayClassIdIncrement'))">
                a.sundayClassId=ifnull(a.sundayClassId,0) + #{data.sundayClassIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('sundayClassName')) or (colPickMode==1 and !data.containsKey('sundayClassName'))">
                a.sundayClassName=#{data.sundayClassName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('holidays')) or (colPickMode==1 and !data.containsKey('holidays'))">
                a.holidays=#{data.holidays},
            </if>
            <if test="(colPickMode==0 and data.containsKey('holidaysIncrement')) or (colPickMode==1 and !data.containsKey('holidaysIncrement'))">
                a.holidays=ifnull(a.holidays,0) + #{data.holidaysIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
                a.remark=#{data.remark},
            </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('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
                a.createTime=#{data.createTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
                a.updateUserId=#{data.updateUserId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
                a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
                a.updateTime=#{data.updateTime},
            </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_attendance_group_fixedwork as a
        <trim prefix="set" suffixOverrides=",">
            <trim prefix="groupId=(case" suffix="ELSE groupId end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('groupId')) or (colPickMode==1 and !item.containsKey('groupId'))">
                            when a.id=#{item.id} then #{item.groupId}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('groupIdIncrement')) or (colPickMode==1 and !item.containsKey('groupIdIncrement'))">
                            when a.id=#{item.id} then ifnull(a.groupId,0) + #{item.groupIdIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="groupName=(case" suffix="ELSE groupName end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('groupName')) or (colPickMode==1 and !item.containsKey('groupName'))">
                        when a.id=#{item.id} then #{item.groupName}
                    </if>
                </foreach>
            </trim>
            <trim prefix="monday=(case" suffix="ELSE monday end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('monday')) or (colPickMode==1 and !item.containsKey('monday'))">
                            when a.id=#{item.id} then #{item.monday}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('mondayIncrement')) or (colPickMode==1 and !item.containsKey('mondayIncrement'))">
                            when a.id=#{item.id} then ifnull(a.monday,0) + #{item.mondayIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="mondayClassId=(case" suffix="ELSE mondayClassId end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('mondayClassId')) or (colPickMode==1 and !item.containsKey('mondayClassId'))">
                            when a.id=#{item.id} then #{item.mondayClassId}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('mondayClassIdIncrement')) or (colPickMode==1 and !item.containsKey('mondayClassIdIncrement'))">
                            when a.id=#{item.id} then ifnull(a.mondayClassId,0) + #{item.mondayClassIdIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="mondayClassName=(case" suffix="ELSE mondayClassName end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('mondayClassName')) or (colPickMode==1 and !item.containsKey('mondayClassName'))">
                        when a.id=#{item.id} then #{item.mondayClassName}
                    </if>
                </foreach>
            </trim>
            <trim prefix="tuesday=(case" suffix="ELSE tuesday end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('tuesday')) or (colPickMode==1 and !item.containsKey('tuesday'))">
                            when a.id=#{item.id} then #{item.tuesday}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('tuesdayIncrement')) or (colPickMode==1 and !item.containsKey('tuesdayIncrement'))">
                            when a.id=#{item.id} then ifnull(a.tuesday,0) + #{item.tuesdayIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="tuesdayClassId=(case" suffix="ELSE tuesdayClassId end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('tuesdayClassId')) or (colPickMode==1 and !item.containsKey('tuesdayClassId'))">
                            when a.id=#{item.id} then #{item.tuesdayClassId}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('tuesdayClassIdIncrement')) or (colPickMode==1 and !item.containsKey('tuesdayClassIdIncrement'))">
                            when a.id=#{item.id} then ifnull(a.tuesdayClassId,0) + #{item.tuesdayClassIdIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="tuesdayClassName=(case" suffix="ELSE tuesdayClassName end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('tuesdayClassName')) or (colPickMode==1 and !item.containsKey('tuesdayClassName'))">
                        when a.id=#{item.id} then #{item.tuesdayClassName}
                    </if>
                </foreach>
            </trim>
            <trim prefix="wednesday=(case" suffix="ELSE wednesday end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('wednesday')) or (colPickMode==1 and !item.containsKey('wednesday'))">
                            when a.id=#{item.id} then #{item.wednesday}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('wednesdayIncrement')) or (colPickMode==1 and !item.containsKey('wednesdayIncrement'))">
                            when a.id=#{item.id} then ifnull(a.wednesday,0) + #{item.wednesdayIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="wednesdayClassId=(case" suffix="ELSE wednesdayClassId end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('wednesdayClassId')) or (colPickMode==1 and !item.containsKey('wednesdayClassId'))">
                            when a.id=#{item.id} then #{item.wednesdayClassId}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('wednesdayClassIdIncrement')) or (colPickMode==1 and !item.containsKey('wednesdayClassIdIncrement'))">
                            when a.id=#{item.id} then ifnull(a.wednesdayClassId,0) + #{item.wednesdayClassIdIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="wednesdayClassName=(case" suffix="ELSE wednesdayClassName end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('wednesdayClassName')) or (colPickMode==1 and !item.containsKey('wednesdayClassName'))">
                        when a.id=#{item.id} then #{item.wednesdayClassName}
                    </if>
                </foreach>
            </trim>
            <trim prefix="thursday=(case" suffix="ELSE thursday end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('thursday')) or (colPickMode==1 and !item.containsKey('thursday'))">
                            when a.id=#{item.id} then #{item.thursday}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('thursdayIncrement')) or (colPickMode==1 and !item.containsKey('thursdayIncrement'))">
                            when a.id=#{item.id} then ifnull(a.thursday,0) + #{item.thursdayIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="thursdayClassId=(case" suffix="ELSE thursdayClassId end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('thursdayClassId')) or (colPickMode==1 and !item.containsKey('thursdayClassId'))">
                            when a.id=#{item.id} then #{item.thursdayClassId}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('thursdayClassIdIncrement')) or (colPickMode==1 and !item.containsKey('thursdayClassIdIncrement'))">
                            when a.id=#{item.id} then ifnull(a.thursdayClassId,0) + #{item.thursdayClassIdIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="thursdayClassName=(case" suffix="ELSE thursdayClassName end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('thursdayClassName')) or (colPickMode==1 and !item.containsKey('thursdayClassName'))">
                        when a.id=#{item.id} then #{item.thursdayClassName}
                    </if>
                </foreach>
            </trim>
            <trim prefix="friday=(case" suffix="ELSE friday end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('friday')) or (colPickMode==1 and !item.containsKey('friday'))">
                            when a.id=#{item.id} then #{item.friday}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('fridayIncrement')) or (colPickMode==1 and !item.containsKey('fridayIncrement'))">
                            when a.id=#{item.id} then ifnull(a.friday,0) + #{item.fridayIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="fridayClassId=(case" suffix="ELSE fridayClassId end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('fridayClassId')) or (colPickMode==1 and !item.containsKey('fridayClassId'))">
                            when a.id=#{item.id} then #{item.fridayClassId}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('fridayClassIdIncrement')) or (colPickMode==1 and !item.containsKey('fridayClassIdIncrement'))">
                            when a.id=#{item.id} then ifnull(a.fridayClassId,0) + #{item.fridayClassIdIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="fridayClassName=(case" suffix="ELSE fridayClassName end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('fridayClassName')) or (colPickMode==1 and !item.containsKey('fridayClassName'))">
                        when a.id=#{item.id} then #{item.fridayClassName}
                    </if>
                </foreach>
            </trim>
            <trim prefix="saturday=(case" suffix="ELSE saturday end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('saturday')) or (colPickMode==1 and !item.containsKey('saturday'))">
                            when a.id=#{item.id} then #{item.saturday}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('saturdayIncrement')) or (colPickMode==1 and !item.containsKey('saturdayIncrement'))">
                            when a.id=#{item.id} then ifnull(a.saturday,0) + #{item.saturdayIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="saturdayClassId=(case" suffix="ELSE saturdayClassId end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('saturdayClassId')) or (colPickMode==1 and !item.containsKey('saturdayClassId'))">
                            when a.id=#{item.id} then #{item.saturdayClassId}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('saturdayClassIdIncrement')) or (colPickMode==1 and !item.containsKey('saturdayClassIdIncrement'))">
                            when a.id=#{item.id} then ifnull(a.saturdayClassId,0) + #{item.saturdayClassIdIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="saturdayClassName=(case" suffix="ELSE saturdayClassName end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('saturdayClassName')) or (colPickMode==1 and !item.containsKey('saturdayClassName'))">
                        when a.id=#{item.id} then #{item.saturdayClassName}
                    </if>
                </foreach>
            </trim>
            <trim prefix="sunday=(case" suffix="ELSE sunday end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('sunday')) or (colPickMode==1 and !item.containsKey('sunday'))">
                            when a.id=#{item.id} then #{item.sunday}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('sundayIncrement')) or (colPickMode==1 and !item.containsKey('sundayIncrement'))">
                            when a.id=#{item.id} then ifnull(a.sunday,0) + #{item.sundayIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="sundayClassId=(case" suffix="ELSE sundayClassId end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('sundayClassId')) or (colPickMode==1 and !item.containsKey('sundayClassId'))">
                            when a.id=#{item.id} then #{item.sundayClassId}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('sundayClassIdIncrement')) or (colPickMode==1 and !item.containsKey('sundayClassIdIncrement'))">
                            when a.id=#{item.id} then ifnull(a.sundayClassId,0) + #{item.sundayClassIdIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="sundayClassName=(case" suffix="ELSE sundayClassName end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('sundayClassName')) or (colPickMode==1 and !item.containsKey('sundayClassName'))">
                        when a.id=#{item.id} then #{item.sundayClassName}
                    </if>
                </foreach>
            </trim>
            <trim prefix="holidays=(case" suffix="ELSE holidays end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('holidays')) or (colPickMode==1 and !item.containsKey('holidays'))">
                            when a.id=#{item.id} then #{item.holidays}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('holidaysIncrement')) or (colPickMode==1 and !item.containsKey('holidaysIncrement'))">
                            when a.id=#{item.id} then ifnull(a.holidays,0) + #{item.holidaysIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="remark=(case" suffix="ELSE remark end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
                        when a.id=#{item.id} then #{item.remark}
                    </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="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="updateUserId=(case" suffix="ELSE updateUserId end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
                            when a.id=#{item.id} then #{item.updateUserId}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
                            when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
                        </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>
        where id in
        <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
            #{item.id}
        </foreach>
    </update>
    <!-- 根据主健查询 -->
    <select id="getByKey" parameterType="paramDto" resultMap="AttendanceGroupFixedworkEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_attendance_group_fixedwork as a
        where a.id=#{condition.id}
    </select>
    <!-- 根据主健删除 -->
    <delete id="deleteByKey" parameterType="paramDto">
        delete a.* from mortals_xhx_attendance_group_fixedwork as a where a.id=#{condition.id}
    </delete>
    <!-- 根据主健删除一批，针对单一主健有效 -->
    <delete id="deleteByKeys">
        delete from mortals_xhx_attendance_group_fixedwork where id in
        <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>
    <!-- 根据主健列表删除一批，针对单一主健有效 -->
    <delete id="deleteByKeyList">
        delete from mortals_xhx_attendance_group_fixedwork where id in
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

    <!-- 根据对象列表删除一批，针对单一主健有效 -->
    <delete id="deleteByEntityList">
        delete from mortals_xhx_attendance_group_fixedwork where id in
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item.id}
        </foreach>
    </delete>
    <!-- 根据paramDto删除一批 -->
    <delete id="deleteByMap" parameterType="paramDto">
        delete a.* from mortals_xhx_attendance_group_fixedwork as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </delete>
    <!-- 获取列表 -->
    <select id="getList" parameterType="paramDto" resultMap="AttendanceGroupFixedworkEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_attendance_group_fixedwork as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
        <include refid="_orderCols_"/>
    </select>
    <!-- 获取子列表 -->
    <select id="getAttendanceGroupFixedworkSpecialByFixedWorkId" parameterType="java.lang.Long" resultMap="AttendanceGroupFixedworkSpecialEntity-Map">
        select <include refid="_columns_sub"/>
        from mortals_xhx_attendance_group_fixedwork_special as b
        <trim suffixOverrides="where" suffix="">
            where b.fixedWorkId = #{id}
        </trim>
    </select>



    <!-- 获取 -->
    <select id="getListCount" parameterType="paramDto" resultType="int">
        select count(1)
        from mortals_xhx_attendance_group_fixedwork 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('idNotList')">
            ${_conditionType_} a.id not in
            <foreach collection="conditionParamRef.idNotList" 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('groupId')">
            <if test="conditionParamRef.groupId != null ">
                ${_conditionType_} a.groupId = #{${_conditionParam_}.groupId}
            </if>
            <if test="conditionParamRef.groupId == null">
                ${_conditionType_} a.groupId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('groupIdList')">
            ${_conditionType_} a.groupId in
            <foreach collection="conditionParamRef.groupIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('groupIdNotList')">
            ${_conditionType_} a.groupId not in
            <foreach collection="conditionParamRef.groupIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('groupIdStart') and conditionParamRef.groupIdStart != null">
            ${_conditionType_} a.groupId <![CDATA[ >= ]]> #{${_conditionParam_}.groupIdStart}
        </if>
        <if test="conditionParamRef.containsKey('groupIdEnd') and conditionParamRef.groupIdEnd != null">
            ${_conditionType_} a.groupId <![CDATA[ <= ]]> #{${_conditionParam_}.groupIdEnd}
        </if>


        <if test="conditionParamRef.containsKey('groupName')">
            <if test="conditionParamRef.groupName != null and conditionParamRef.groupName != ''">
                ${_conditionType_} a.groupName like #{${_conditionParam_}.groupName}
            </if>
            <if test="conditionParamRef.groupName == null">
                ${_conditionType_} a.groupName is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('groupNameList')">
            ${_conditionType_} a.groupName in
            <foreach collection="conditionParamRef.groupNameList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('groupNameNotList')">
            ${_conditionType_} a.groupName not in
            <foreach collection="conditionParamRef.groupNameNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('monday')">
            <if test="conditionParamRef.monday != null ">
                ${_conditionType_} a.monday = #{${_conditionParam_}.monday}
            </if>
            <if test="conditionParamRef.monday == null">
                ${_conditionType_} a.monday is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('mondayList')">
            ${_conditionType_} a.monday in
            <foreach collection="conditionParamRef.mondayList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('mondayNotList')">
            ${_conditionType_} a.monday not in
            <foreach collection="conditionParamRef.mondayNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('mondayStart') and conditionParamRef.mondayStart != null">
            ${_conditionType_} a.monday <![CDATA[ >= ]]> #{${_conditionParam_}.mondayStart}
        </if>
        <if test="conditionParamRef.containsKey('mondayEnd') and conditionParamRef.mondayEnd != null">
            ${_conditionType_} a.monday <![CDATA[ <= ]]> #{${_conditionParam_}.mondayEnd}
        </if>

        <if test="conditionParamRef.containsKey('mondayClassId')">
            <if test="conditionParamRef.mondayClassId != null ">
                ${_conditionType_} a.mondayClassId = #{${_conditionParam_}.mondayClassId}
            </if>
            <if test="conditionParamRef.mondayClassId == null">
                ${_conditionType_} a.mondayClassId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('mondayClassIdList')">
            ${_conditionType_} a.mondayClassId in
            <foreach collection="conditionParamRef.mondayClassIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('mondayClassIdNotList')">
            ${_conditionType_} a.mondayClassId not in
            <foreach collection="conditionParamRef.mondayClassIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('mondayClassIdStart') and conditionParamRef.mondayClassIdStart != null">
            ${_conditionType_} a.mondayClassId <![CDATA[ >= ]]> #{${_conditionParam_}.mondayClassIdStart}
        </if>
        <if test="conditionParamRef.containsKey('mondayClassIdEnd') and conditionParamRef.mondayClassIdEnd != null">
            ${_conditionType_} a.mondayClassId <![CDATA[ <= ]]> #{${_conditionParam_}.mondayClassIdEnd}
        </if>


        <if test="conditionParamRef.containsKey('mondayClassName')">
            <if test="conditionParamRef.mondayClassName != null and conditionParamRef.mondayClassName != ''">
                ${_conditionType_} a.mondayClassName like #{${_conditionParam_}.mondayClassName}
            </if>
            <if test="conditionParamRef.mondayClassName == null">
                ${_conditionType_} a.mondayClassName is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('mondayClassNameList')">
            ${_conditionType_} a.mondayClassName in
            <foreach collection="conditionParamRef.mondayClassNameList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('mondayClassNameNotList')">
            ${_conditionType_} a.mondayClassName not in
            <foreach collection="conditionParamRef.mondayClassNameNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('tuesday')">
            <if test="conditionParamRef.tuesday != null ">
                ${_conditionType_} a.tuesday = #{${_conditionParam_}.tuesday}
            </if>
            <if test="conditionParamRef.tuesday == null">
                ${_conditionType_} a.tuesday is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('tuesdayList')">
            ${_conditionType_} a.tuesday in
            <foreach collection="conditionParamRef.tuesdayList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('tuesdayNotList')">
            ${_conditionType_} a.tuesday not in
            <foreach collection="conditionParamRef.tuesdayNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('tuesdayStart') and conditionParamRef.tuesdayStart != null">
            ${_conditionType_} a.tuesday <![CDATA[ >= ]]> #{${_conditionParam_}.tuesdayStart}
        </if>
        <if test="conditionParamRef.containsKey('tuesdayEnd') and conditionParamRef.tuesdayEnd != null">
            ${_conditionType_} a.tuesday <![CDATA[ <= ]]> #{${_conditionParam_}.tuesdayEnd}
        </if>

        <if test="conditionParamRef.containsKey('tuesdayClassId')">
            <if test="conditionParamRef.tuesdayClassId != null ">
                ${_conditionType_} a.tuesdayClassId = #{${_conditionParam_}.tuesdayClassId}
            </if>
            <if test="conditionParamRef.tuesdayClassId == null">
                ${_conditionType_} a.tuesdayClassId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('tuesdayClassIdList')">
            ${_conditionType_} a.tuesdayClassId in
            <foreach collection="conditionParamRef.tuesdayClassIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('tuesdayClassIdNotList')">
            ${_conditionType_} a.tuesdayClassId not in
            <foreach collection="conditionParamRef.tuesdayClassIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('tuesdayClassIdStart') and conditionParamRef.tuesdayClassIdStart != null">
            ${_conditionType_} a.tuesdayClassId <![CDATA[ >= ]]> #{${_conditionParam_}.tuesdayClassIdStart}
        </if>
        <if test="conditionParamRef.containsKey('tuesdayClassIdEnd') and conditionParamRef.tuesdayClassIdEnd != null">
            ${_conditionType_} a.tuesdayClassId <![CDATA[ <= ]]> #{${_conditionParam_}.tuesdayClassIdEnd}
        </if>


        <if test="conditionParamRef.containsKey('tuesdayClassName')">
            <if test="conditionParamRef.tuesdayClassName != null and conditionParamRef.tuesdayClassName != ''">
                ${_conditionType_} a.tuesdayClassName like #{${_conditionParam_}.tuesdayClassName}
            </if>
            <if test="conditionParamRef.tuesdayClassName == null">
                ${_conditionType_} a.tuesdayClassName is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('tuesdayClassNameList')">
            ${_conditionType_} a.tuesdayClassName in
            <foreach collection="conditionParamRef.tuesdayClassNameList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('tuesdayClassNameNotList')">
            ${_conditionType_} a.tuesdayClassName not in
            <foreach collection="conditionParamRef.tuesdayClassNameNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('wednesday')">
            <if test="conditionParamRef.wednesday != null ">
                ${_conditionType_} a.wednesday = #{${_conditionParam_}.wednesday}
            </if>
            <if test="conditionParamRef.wednesday == null">
                ${_conditionType_} a.wednesday is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('wednesdayList')">
            ${_conditionType_} a.wednesday in
            <foreach collection="conditionParamRef.wednesdayList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('wednesdayNotList')">
            ${_conditionType_} a.wednesday not in
            <foreach collection="conditionParamRef.wednesdayNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('wednesdayStart') and conditionParamRef.wednesdayStart != null">
            ${_conditionType_} a.wednesday <![CDATA[ >= ]]> #{${_conditionParam_}.wednesdayStart}
        </if>
        <if test="conditionParamRef.containsKey('wednesdayEnd') and conditionParamRef.wednesdayEnd != null">
            ${_conditionType_} a.wednesday <![CDATA[ <= ]]> #{${_conditionParam_}.wednesdayEnd}
        </if>

        <if test="conditionParamRef.containsKey('wednesdayClassId')">
            <if test="conditionParamRef.wednesdayClassId != null ">
                ${_conditionType_} a.wednesdayClassId = #{${_conditionParam_}.wednesdayClassId}
            </if>
            <if test="conditionParamRef.wednesdayClassId == null">
                ${_conditionType_} a.wednesdayClassId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('wednesdayClassIdList')">
            ${_conditionType_} a.wednesdayClassId in
            <foreach collection="conditionParamRef.wednesdayClassIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('wednesdayClassIdNotList')">
            ${_conditionType_} a.wednesdayClassId not in
            <foreach collection="conditionParamRef.wednesdayClassIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('wednesdayClassIdStart') and conditionParamRef.wednesdayClassIdStart != null">
            ${_conditionType_} a.wednesdayClassId <![CDATA[ >= ]]> #{${_conditionParam_}.wednesdayClassIdStart}
        </if>
        <if test="conditionParamRef.containsKey('wednesdayClassIdEnd') and conditionParamRef.wednesdayClassIdEnd != null">
            ${_conditionType_} a.wednesdayClassId <![CDATA[ <= ]]> #{${_conditionParam_}.wednesdayClassIdEnd}
        </if>


        <if test="conditionParamRef.containsKey('wednesdayClassName')">
            <if test="conditionParamRef.wednesdayClassName != null and conditionParamRef.wednesdayClassName != ''">
                ${_conditionType_} a.wednesdayClassName like #{${_conditionParam_}.wednesdayClassName}
            </if>
            <if test="conditionParamRef.wednesdayClassName == null">
                ${_conditionType_} a.wednesdayClassName is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('wednesdayClassNameList')">
            ${_conditionType_} a.wednesdayClassName in
            <foreach collection="conditionParamRef.wednesdayClassNameList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('wednesdayClassNameNotList')">
            ${_conditionType_} a.wednesdayClassName not in
            <foreach collection="conditionParamRef.wednesdayClassNameNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('thursday')">
            <if test="conditionParamRef.thursday != null ">
                ${_conditionType_} a.thursday = #{${_conditionParam_}.thursday}
            </if>
            <if test="conditionParamRef.thursday == null">
                ${_conditionType_} a.thursday is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('thursdayList')">
            ${_conditionType_} a.thursday in
            <foreach collection="conditionParamRef.thursdayList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('thursdayNotList')">
            ${_conditionType_} a.thursday not in
            <foreach collection="conditionParamRef.thursdayNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('thursdayStart') and conditionParamRef.thursdayStart != null">
            ${_conditionType_} a.thursday <![CDATA[ >= ]]> #{${_conditionParam_}.thursdayStart}
        </if>
        <if test="conditionParamRef.containsKey('thursdayEnd') and conditionParamRef.thursdayEnd != null">
            ${_conditionType_} a.thursday <![CDATA[ <= ]]> #{${_conditionParam_}.thursdayEnd}
        </if>

        <if test="conditionParamRef.containsKey('thursdayClassId')">
            <if test="conditionParamRef.thursdayClassId != null ">
                ${_conditionType_} a.thursdayClassId = #{${_conditionParam_}.thursdayClassId}
            </if>
            <if test="conditionParamRef.thursdayClassId == null">
                ${_conditionType_} a.thursdayClassId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('thursdayClassIdList')">
            ${_conditionType_} a.thursdayClassId in
            <foreach collection="conditionParamRef.thursdayClassIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('thursdayClassIdNotList')">
            ${_conditionType_} a.thursdayClassId not in
            <foreach collection="conditionParamRef.thursdayClassIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('thursdayClassIdStart') and conditionParamRef.thursdayClassIdStart != null">
            ${_conditionType_} a.thursdayClassId <![CDATA[ >= ]]> #{${_conditionParam_}.thursdayClassIdStart}
        </if>
        <if test="conditionParamRef.containsKey('thursdayClassIdEnd') and conditionParamRef.thursdayClassIdEnd != null">
            ${_conditionType_} a.thursdayClassId <![CDATA[ <= ]]> #{${_conditionParam_}.thursdayClassIdEnd}
        </if>


        <if test="conditionParamRef.containsKey('thursdayClassName')">
            <if test="conditionParamRef.thursdayClassName != null and conditionParamRef.thursdayClassName != ''">
                ${_conditionType_} a.thursdayClassName like #{${_conditionParam_}.thursdayClassName}
            </if>
            <if test="conditionParamRef.thursdayClassName == null">
                ${_conditionType_} a.thursdayClassName is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('thursdayClassNameList')">
            ${_conditionType_} a.thursdayClassName in
            <foreach collection="conditionParamRef.thursdayClassNameList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('thursdayClassNameNotList')">
            ${_conditionType_} a.thursdayClassName not in
            <foreach collection="conditionParamRef.thursdayClassNameNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('friday')">
            <if test="conditionParamRef.friday != null ">
                ${_conditionType_} a.friday = #{${_conditionParam_}.friday}
            </if>
            <if test="conditionParamRef.friday == null">
                ${_conditionType_} a.friday is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('fridayList')">
            ${_conditionType_} a.friday in
            <foreach collection="conditionParamRef.fridayList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('fridayNotList')">
            ${_conditionType_} a.friday not in
            <foreach collection="conditionParamRef.fridayNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('fridayStart') and conditionParamRef.fridayStart != null">
            ${_conditionType_} a.friday <![CDATA[ >= ]]> #{${_conditionParam_}.fridayStart}
        </if>
        <if test="conditionParamRef.containsKey('fridayEnd') and conditionParamRef.fridayEnd != null">
            ${_conditionType_} a.friday <![CDATA[ <= ]]> #{${_conditionParam_}.fridayEnd}
        </if>

        <if test="conditionParamRef.containsKey('fridayClassId')">
            <if test="conditionParamRef.fridayClassId != null ">
                ${_conditionType_} a.fridayClassId = #{${_conditionParam_}.fridayClassId}
            </if>
            <if test="conditionParamRef.fridayClassId == null">
                ${_conditionType_} a.fridayClassId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('fridayClassIdList')">
            ${_conditionType_} a.fridayClassId in
            <foreach collection="conditionParamRef.fridayClassIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('fridayClassIdNotList')">
            ${_conditionType_} a.fridayClassId not in
            <foreach collection="conditionParamRef.fridayClassIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('fridayClassIdStart') and conditionParamRef.fridayClassIdStart != null">
            ${_conditionType_} a.fridayClassId <![CDATA[ >= ]]> #{${_conditionParam_}.fridayClassIdStart}
        </if>
        <if test="conditionParamRef.containsKey('fridayClassIdEnd') and conditionParamRef.fridayClassIdEnd != null">
            ${_conditionType_} a.fridayClassId <![CDATA[ <= ]]> #{${_conditionParam_}.fridayClassIdEnd}
        </if>


        <if test="conditionParamRef.containsKey('fridayClassName')">
            <if test="conditionParamRef.fridayClassName != null and conditionParamRef.fridayClassName != ''">
                ${_conditionType_} a.fridayClassName like #{${_conditionParam_}.fridayClassName}
            </if>
            <if test="conditionParamRef.fridayClassName == null">
                ${_conditionType_} a.fridayClassName is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('fridayClassNameList')">
            ${_conditionType_} a.fridayClassName in
            <foreach collection="conditionParamRef.fridayClassNameList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('fridayClassNameNotList')">
            ${_conditionType_} a.fridayClassName not in
            <foreach collection="conditionParamRef.fridayClassNameNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('saturday')">
            <if test="conditionParamRef.saturday != null ">
                ${_conditionType_} a.saturday = #{${_conditionParam_}.saturday}
            </if>
            <if test="conditionParamRef.saturday == null">
                ${_conditionType_} a.saturday is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('saturdayList')">
            ${_conditionType_} a.saturday in
            <foreach collection="conditionParamRef.saturdayList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('saturdayNotList')">
            ${_conditionType_} a.saturday not in
            <foreach collection="conditionParamRef.saturdayNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('saturdayStart') and conditionParamRef.saturdayStart != null">
            ${_conditionType_} a.saturday <![CDATA[ >= ]]> #{${_conditionParam_}.saturdayStart}
        </if>
        <if test="conditionParamRef.containsKey('saturdayEnd') and conditionParamRef.saturdayEnd != null">
            ${_conditionType_} a.saturday <![CDATA[ <= ]]> #{${_conditionParam_}.saturdayEnd}
        </if>

        <if test="conditionParamRef.containsKey('saturdayClassId')">
            <if test="conditionParamRef.saturdayClassId != null ">
                ${_conditionType_} a.saturdayClassId = #{${_conditionParam_}.saturdayClassId}
            </if>
            <if test="conditionParamRef.saturdayClassId == null">
                ${_conditionType_} a.saturdayClassId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('saturdayClassIdList')">
            ${_conditionType_} a.saturdayClassId in
            <foreach collection="conditionParamRef.saturdayClassIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('saturdayClassIdNotList')">
            ${_conditionType_} a.saturdayClassId not in
            <foreach collection="conditionParamRef.saturdayClassIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('saturdayClassIdStart') and conditionParamRef.saturdayClassIdStart != null">
            ${_conditionType_} a.saturdayClassId <![CDATA[ >= ]]> #{${_conditionParam_}.saturdayClassIdStart}
        </if>
        <if test="conditionParamRef.containsKey('saturdayClassIdEnd') and conditionParamRef.saturdayClassIdEnd != null">
            ${_conditionType_} a.saturdayClassId <![CDATA[ <= ]]> #{${_conditionParam_}.saturdayClassIdEnd}
        </if>


        <if test="conditionParamRef.containsKey('saturdayClassName')">
            <if test="conditionParamRef.saturdayClassName != null and conditionParamRef.saturdayClassName != ''">
                ${_conditionType_} a.saturdayClassName like #{${_conditionParam_}.saturdayClassName}
            </if>
            <if test="conditionParamRef.saturdayClassName == null">
                ${_conditionType_} a.saturdayClassName is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('saturdayClassNameList')">
            ${_conditionType_} a.saturdayClassName in
            <foreach collection="conditionParamRef.saturdayClassNameList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('saturdayClassNameNotList')">
            ${_conditionType_} a.saturdayClassName not in
            <foreach collection="conditionParamRef.saturdayClassNameNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('sunday')">
            <if test="conditionParamRef.sunday != null ">
                ${_conditionType_} a.sunday = #{${_conditionParam_}.sunday}
            </if>
            <if test="conditionParamRef.sunday == null">
                ${_conditionType_} a.sunday is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('sundayList')">
            ${_conditionType_} a.sunday in
            <foreach collection="conditionParamRef.sundayList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('sundayNotList')">
            ${_conditionType_} a.sunday not in
            <foreach collection="conditionParamRef.sundayNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('sundayStart') and conditionParamRef.sundayStart != null">
            ${_conditionType_} a.sunday <![CDATA[ >= ]]> #{${_conditionParam_}.sundayStart}
        </if>
        <if test="conditionParamRef.containsKey('sundayEnd') and conditionParamRef.sundayEnd != null">
            ${_conditionType_} a.sunday <![CDATA[ <= ]]> #{${_conditionParam_}.sundayEnd}
        </if>

        <if test="conditionParamRef.containsKey('sundayClassId')">
            <if test="conditionParamRef.sundayClassId != null ">
                ${_conditionType_} a.sundayClassId = #{${_conditionParam_}.sundayClassId}
            </if>
            <if test="conditionParamRef.sundayClassId == null">
                ${_conditionType_} a.sundayClassId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('sundayClassIdList')">
            ${_conditionType_} a.sundayClassId in
            <foreach collection="conditionParamRef.sundayClassIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('sundayClassIdNotList')">
            ${_conditionType_} a.sundayClassId not in
            <foreach collection="conditionParamRef.sundayClassIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('sundayClassIdStart') and conditionParamRef.sundayClassIdStart != null">
            ${_conditionType_} a.sundayClassId <![CDATA[ >= ]]> #{${_conditionParam_}.sundayClassIdStart}
        </if>
        <if test="conditionParamRef.containsKey('sundayClassIdEnd') and conditionParamRef.sundayClassIdEnd != null">
            ${_conditionType_} a.sundayClassId <![CDATA[ <= ]]> #{${_conditionParam_}.sundayClassIdEnd}
        </if>


        <if test="conditionParamRef.containsKey('sundayClassName')">
            <if test="conditionParamRef.sundayClassName != null and conditionParamRef.sundayClassName != ''">
                ${_conditionType_} a.sundayClassName like #{${_conditionParam_}.sundayClassName}
            </if>
            <if test="conditionParamRef.sundayClassName == null">
                ${_conditionType_} a.sundayClassName is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('sundayClassNameList')">
            ${_conditionType_} a.sundayClassName in
            <foreach collection="conditionParamRef.sundayClassNameList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('sundayClassNameNotList')">
            ${_conditionType_} a.sundayClassName not in
            <foreach collection="conditionParamRef.sundayClassNameNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('holidays')">
            <if test="conditionParamRef.holidays != null ">
                ${_conditionType_} a.holidays = #{${_conditionParam_}.holidays}
            </if>
            <if test="conditionParamRef.holidays == null">
                ${_conditionType_} a.holidays is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('holidaysList')">
            ${_conditionType_} a.holidays in
            <foreach collection="conditionParamRef.holidaysList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('holidaysNotList')">
            ${_conditionType_} a.holidays not in
            <foreach collection="conditionParamRef.holidaysNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('holidaysStart') and conditionParamRef.holidaysStart != null">
            ${_conditionType_} a.holidays <![CDATA[ >= ]]> #{${_conditionParam_}.holidaysStart}
        </if>
        <if test="conditionParamRef.containsKey('holidaysEnd') and conditionParamRef.holidaysEnd != null">
            ${_conditionType_} a.holidays <![CDATA[ <= ]]> #{${_conditionParam_}.holidaysEnd}
        </if>


        <if test="conditionParamRef.containsKey('remark')">
            <if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
                ${_conditionType_} a.remark like #{${_conditionParam_}.remark}
            </if>
            <if test="conditionParamRef.remark == null">
                ${_conditionType_} a.remark is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('remarkList')">
            ${_conditionType_} a.remark in
            <foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('remarkNotList')">
            ${_conditionType_} a.remark not in
            <foreach collection="conditionParamRef.remarkNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </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('createUserIdNotList')">
            ${_conditionType_} a.createUserId not in
            <foreach collection="conditionParamRef.createUserIdNotList" 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('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('updateUserId')">
            <if test="conditionParamRef.updateUserId != null ">
                ${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
            </if>
            <if test="conditionParamRef.updateUserId == null">
                ${_conditionType_} a.updateUserId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('updateUserIdList')">
            ${_conditionType_} a.updateUserId in
            <foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('updateUserIdNotList')">
            ${_conditionType_} a.updateUserId not in
            <foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
            ${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
        </if>
        <if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
            ${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
        </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>
    </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('groupId')">
                    a.groupId
                    <if test='orderCol.groupId != null and "DESC".equalsIgnoreCase(orderCol.groupId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('groupName')">
                    a.groupName
                    <if test='orderCol.groupName != null and "DESC".equalsIgnoreCase(orderCol.groupName)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('monday')">
                    a.monday
                    <if test='orderCol.monday != null and "DESC".equalsIgnoreCase(orderCol.monday)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('mondayClassId')">
                    a.mondayClassId
                    <if test='orderCol.mondayClassId != null and "DESC".equalsIgnoreCase(orderCol.mondayClassId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('mondayClassName')">
                    a.mondayClassName
                    <if test='orderCol.mondayClassName != null and "DESC".equalsIgnoreCase(orderCol.mondayClassName)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('tuesday')">
                    a.tuesday
                    <if test='orderCol.tuesday != null and "DESC".equalsIgnoreCase(orderCol.tuesday)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('tuesdayClassId')">
                    a.tuesdayClassId
                    <if test='orderCol.tuesdayClassId != null and "DESC".equalsIgnoreCase(orderCol.tuesdayClassId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('tuesdayClassName')">
                    a.tuesdayClassName
                    <if test='orderCol.tuesdayClassName != null and "DESC".equalsIgnoreCase(orderCol.tuesdayClassName)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('wednesday')">
                    a.wednesday
                    <if test='orderCol.wednesday != null and "DESC".equalsIgnoreCase(orderCol.wednesday)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('wednesdayClassId')">
                    a.wednesdayClassId
                    <if test='orderCol.wednesdayClassId != null and "DESC".equalsIgnoreCase(orderCol.wednesdayClassId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('wednesdayClassName')">
                    a.wednesdayClassName
                    <if test='orderCol.wednesdayClassName != null and "DESC".equalsIgnoreCase(orderCol.wednesdayClassName)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('thursday')">
                    a.thursday
                    <if test='orderCol.thursday != null and "DESC".equalsIgnoreCase(orderCol.thursday)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('thursdayClassId')">
                    a.thursdayClassId
                    <if test='orderCol.thursdayClassId != null and "DESC".equalsIgnoreCase(orderCol.thursdayClassId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('thursdayClassName')">
                    a.thursdayClassName
                    <if test='orderCol.thursdayClassName != null and "DESC".equalsIgnoreCase(orderCol.thursdayClassName)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('friday')">
                    a.friday
                    <if test='orderCol.friday != null and "DESC".equalsIgnoreCase(orderCol.friday)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('fridayClassId')">
                    a.fridayClassId
                    <if test='orderCol.fridayClassId != null and "DESC".equalsIgnoreCase(orderCol.fridayClassId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('fridayClassName')">
                    a.fridayClassName
                    <if test='orderCol.fridayClassName != null and "DESC".equalsIgnoreCase(orderCol.fridayClassName)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('saturday')">
                    a.saturday
                    <if test='orderCol.saturday != null and "DESC".equalsIgnoreCase(orderCol.saturday)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('saturdayClassId')">
                    a.saturdayClassId
                    <if test='orderCol.saturdayClassId != null and "DESC".equalsIgnoreCase(orderCol.saturdayClassId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('saturdayClassName')">
                    a.saturdayClassName
                    <if test='orderCol.saturdayClassName != null and "DESC".equalsIgnoreCase(orderCol.saturdayClassName)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('sunday')">
                    a.sunday
                    <if test='orderCol.sunday != null and "DESC".equalsIgnoreCase(orderCol.sunday)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('sundayClassId')">
                    a.sundayClassId
                    <if test='orderCol.sundayClassId != null and "DESC".equalsIgnoreCase(orderCol.sundayClassId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('sundayClassName')">
                    a.sundayClassName
                    <if test='orderCol.sundayClassName != null and "DESC".equalsIgnoreCase(orderCol.sundayClassName)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('holidays')">
                    a.holidays
                    <if test='orderCol.holidays != null and "DESC".equalsIgnoreCase(orderCol.holidays)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('remark')">
                    a.remark
                    <if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>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('createTime')">
                    a.createTime
                    <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('updateUserId')">
                    a.updateUserId
                    <if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('updateTime')">
                    a.updateTime
                    <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>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>