|  | @@ -3,14 +3,13 @@
 | 
	
		
			
				|  |  |          PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
	
		
			
				|  |  |          "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
	
		
			
				|  |  |  <mapper namespace="com.xunmei.core.drill.mapper.CoreDrillDictionaryMapper">
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      <resultMap type="com.xunmei.common.core.domain.drill.domain.CoreDrillDictionary" id="CoreDrillDictionaryResult">
 | 
	
		
			
				|  |  | -                <result property="id" column="id"/>
 | 
	
		
			
				|  |  | -                <result property="drillType" column="drill_type"/>
 | 
	
		
			
				|  |  | -                <result property="drillTypeName" column="drill_type_name"/>
 | 
	
		
			
				|  |  | -                <result property="drillProjects" column="drill_projects"/>
 | 
	
		
			
				|  |  | -                <result property="defaultCause" column="default_cause"/>
 | 
	
		
			
				|  |  | -                <result property="deleted" column="deleted"/>
 | 
	
		
			
				|  |  | +        <result property="id" column="id"/>
 | 
	
		
			
				|  |  | +        <result property="drillType" column="drill_type"/>
 | 
	
		
			
				|  |  | +        <result property="drillTypeName" column="drill_type_name"/>
 | 
	
		
			
				|  |  | +        <result property="drillProjects" column="drill_projects"/>
 | 
	
		
			
				|  |  | +        <result property="defaultCause" column="default_cause"/>
 | 
	
		
			
				|  |  | +        <result property="deleted" column="deleted"/>
 | 
	
		
			
				|  |  |      </resultMap>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <sql id="selectCoreDrillDictionaryVo">
 | 
	
	
		
			
				|  | @@ -18,88 +17,109 @@
 | 
	
		
			
				|  |  |          from core_drill_dictionary
 | 
	
		
			
				|  |  |      </sql>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <select id="selectCoreDrillDictionaryList" parameterType="com.xunmei.common.core.domain.drill.domain.CoreDrillDictionary"
 | 
	
		
			
				|  |  | +    <select id="selectCoreDrillDictionaryList"
 | 
	
		
			
				|  |  | +            parameterType="com.xunmei.common.core.domain.drill.domain.CoreDrillDictionary"
 | 
	
		
			
				|  |  |              resultMap="CoreDrillDictionaryResult">
 | 
	
		
			
				|  |  |          <include refid="selectCoreDrillDictionaryVo"/>
 | 
	
		
			
				|  |  |          <where>
 | 
	
		
			
				|  |  | -                        <if test="drillType != null  and drillType != ''">
 | 
	
		
			
				|  |  | -                            and drill_type = #{drillType}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="drillTypeName != null  and drillTypeName != ''">
 | 
	
		
			
				|  |  | -                            and drill_type_name like concat('%', #{drillTypeName}, '%')
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="drillProjects != null  and drillProjects != ''">
 | 
	
		
			
				|  |  | -                            and drill_projects = #{drillProjects}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | -                        <if test="defaultCause != null  and defaultCause != ''">
 | 
	
		
			
				|  |  | -                            and default_cause = #{defaultCause}
 | 
	
		
			
				|  |  | -                        </if>
 | 
	
		
			
				|  |  | +            <if test="drillType != null  and drillType != ''">
 | 
	
		
			
				|  |  | +                and drill_type = #{drillType}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="drillTypeName != null  and drillTypeName != ''">
 | 
	
		
			
				|  |  | +                and drill_type_name like concat('%', #{drillTypeName}, '%')
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="drillProjects != null  and drillProjects != ''">
 | 
	
		
			
				|  |  | +                and drill_projects = #{drillProjects}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="defaultCause != null  and defaultCause != ''">
 | 
	
		
			
				|  |  | +                and default_cause = #{defaultCause}
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |          </where>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectCoreDrillDictionaryById" parameterType="Long"
 | 
	
		
			
				|  |  |              resultMap="CoreDrillDictionaryResult">
 | 
	
		
			
				|  |  | -            <include refid="selectCoreDrillDictionaryVo"/>
 | 
	
		
			
				|  |  | -            where id = #{id}
 | 
	
		
			
				|  |  | +        <include refid="selectCoreDrillDictionaryVo"/>
 | 
	
		
			
				|  |  | +        where id = #{id}
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <insert id="insertCoreDrillDictionary" parameterType="com.xunmei.common.core.domain.drill.domain.CoreDrillDictionary">
 | 
	
		
			
				|  |  | +    <insert id="insertCoreDrillDictionary"
 | 
	
		
			
				|  |  | +            parameterType="com.xunmei.common.core.domain.drill.domain.CoreDrillDictionary">
 | 
	
		
			
				|  |  |          insert into core_drill_dictionary
 | 
	
		
			
				|  |  |          <trim prefix="(" suffix=")" suffixOverrides=",">
 | 
	
		
			
				|  |  | -                    <if test="id != null">id,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="drillType != null">drill_type,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="drillTypeName != null">drill_type_name,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="drillProjects != null">drill_projects,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="defaultCause != null">default_cause,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="deleted != null">deleted,
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | +            <if test="id != null">
 | 
	
		
			
				|  |  | +                id,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="drillType != null">
 | 
	
		
			
				|  |  | +                drill_type,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="drillTypeName != null">
 | 
	
		
			
				|  |  | +                drill_type_name,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="drillProjects != null">
 | 
	
		
			
				|  |  | +                drill_projects,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="defaultCause != null">
 | 
	
		
			
				|  |  | +                default_cause,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deleted != null">
 | 
	
		
			
				|  |  | +                deleted,
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |          </trim>
 | 
	
		
			
				|  |  |          <trim prefix="values (" suffix=")" suffixOverrides=",">
 | 
	
		
			
				|  |  | -                    <if test="id != null">#{id},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="drillType != null">#{drillType},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="drillTypeName != null">#{drillTypeName},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="drillProjects != null">#{drillProjects},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="defaultCause != null">#{defaultCause},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="deleted != null">#{deleted},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | +            <if test="id != null">
 | 
	
		
			
				|  |  | +                #{id},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="drillType != null">
 | 
	
		
			
				|  |  | +                #{drillType},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="drillTypeName != null">
 | 
	
		
			
				|  |  | +                #{drillTypeName},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="drillProjects != null">
 | 
	
		
			
				|  |  | +                #{drillProjects},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="defaultCause != null">
 | 
	
		
			
				|  |  | +                #{defaultCause},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deleted != null">
 | 
	
		
			
				|  |  | +                #{deleted},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |          </trim>
 | 
	
		
			
				|  |  |      </insert>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <update id="updateCoreDrillDictionary" parameterType="com.xunmei.common.core.domain.drill.domain.CoreDrillDictionary">
 | 
	
		
			
				|  |  | +    <update id="updateCoreDrillDictionary"
 | 
	
		
			
				|  |  | +            parameterType="com.xunmei.common.core.domain.drill.domain.CoreDrillDictionary">
 | 
	
		
			
				|  |  |          update core_drill_dictionary
 | 
	
		
			
				|  |  |          <trim prefix="SET" suffixOverrides=",">
 | 
	
		
			
				|  |  | -                    <if test="drillType != null">drill_type =
 | 
	
		
			
				|  |  | -                        #{drillType},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="drillTypeName != null">drill_type_name =
 | 
	
		
			
				|  |  | -                        #{drillTypeName},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="drillProjects != null">drill_projects =
 | 
	
		
			
				|  |  | -                        #{drillProjects},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="defaultCause != null">default_cause =
 | 
	
		
			
				|  |  | -                        #{defaultCause},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | -                    <if test="deleted != null">deleted =
 | 
	
		
			
				|  |  | -                        #{deleted},
 | 
	
		
			
				|  |  | -                    </if>
 | 
	
		
			
				|  |  | +            <if test="drillType != null">
 | 
	
		
			
				|  |  | +                drill_type =
 | 
	
		
			
				|  |  | +                #{drillType},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="drillTypeName != null">
 | 
	
		
			
				|  |  | +                drill_type_name =
 | 
	
		
			
				|  |  | +                #{drillTypeName},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="drillProjects != null">
 | 
	
		
			
				|  |  | +                drill_projects =
 | 
	
		
			
				|  |  | +                #{drillProjects},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="defaultCause != null">
 | 
	
		
			
				|  |  | +                default_cause =
 | 
	
		
			
				|  |  | +                #{defaultCause},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="deleted != null">
 | 
	
		
			
				|  |  | +                deleted =
 | 
	
		
			
				|  |  | +                #{deleted},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  |          </trim>
 | 
	
		
			
				|  |  |          where id = #{id}
 | 
	
		
			
				|  |  |      </update>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <delete id="deleteCoreDrillDictionaryById" parameterType="Long">
 | 
	
		
			
				|  |  |          delete
 | 
	
		
			
				|  |  | -        from core_drill_dictionary where id = #{id}
 | 
	
		
			
				|  |  | +        from core_drill_dictionary
 | 
	
		
			
				|  |  | +        where id = #{id}
 | 
	
		
			
				|  |  |      </delete>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <delete id="deleteCoreDrillDictionaryByIds" parameterType="String">
 | 
	
	
		
			
				|  | @@ -118,6 +138,12 @@
 | 
	
		
			
				|  |  |          <if test="request.drillType != null">
 | 
	
		
			
				|  |  |              and d.drill_type=#{request.drillType}
 | 
	
		
			
				|  |  |          </if>
 | 
	
		
			
				|  |  | +        <if test="request.checkSub==false">
 | 
	
		
			
				|  |  | +            and d.org_id=#{request.orgId}
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  | +        <if test="request.checkSub==true">
 | 
	
		
			
				|  |  | +            and d.org_path like concat(#{request.orgPath},'%')
 | 
	
		
			
				|  |  | +        </if>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectDetailData" resultType="com.xunmei.common.core.domain.drill.vo.CoreDrillDictionaryDetailVo">
 |