|  | @@ -0,0 +1,141 @@
 | 
	
		
			
				|  |  | +<?xml version="1.0" encoding="UTF-8" ?>
 | 
	
		
			
				|  |  | +<!DOCTYPE mapper
 | 
	
		
			
				|  |  | +        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
	
		
			
				|  |  | +        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
	
		
			
				|  |  | +<mapper namespace="com.xunmei.core.drill.mapper.CoreDrillDictionaryMapper">
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <resultMap type="com.xunmei.core.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="orgId" column="org_id"/>
 | 
	
		
			
				|  |  | +                <result property="orgName" column="org_name"/>
 | 
	
		
			
				|  |  | +                <result property="orgPath" column="org_path"/>
 | 
	
		
			
				|  |  | +                <result property="deleted" column="deleted"/>
 | 
	
		
			
				|  |  | +    </resultMap>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <sql id="selectCoreDrillDictionaryVo">
 | 
	
		
			
				|  |  | +        select id, drill_type, drill_type_name, drill_projects, default_cause, org_id, org_name, org_path, deleted
 | 
	
		
			
				|  |  | +        from core_drill_dictionary
 | 
	
		
			
				|  |  | +    </sql>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <select id="selectCoreDrillDictionaryList" parameterType="com.xunmei.core.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="orgId != null ">
 | 
	
		
			
				|  |  | +                            and org_id = #{orgId}
 | 
	
		
			
				|  |  | +                        </if>
 | 
	
		
			
				|  |  | +                        <if test="orgName != null  and orgName != ''">
 | 
	
		
			
				|  |  | +                            and org_name like concat('%', #{orgName}, '%')
 | 
	
		
			
				|  |  | +                        </if>
 | 
	
		
			
				|  |  | +        </where>
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <select id="selectCoreDrillDictionaryById" parameterType="Long"
 | 
	
		
			
				|  |  | +            resultMap="CoreDrillDictionaryResult">
 | 
	
		
			
				|  |  | +            <include refid="selectCoreDrillDictionaryVo"/>
 | 
	
		
			
				|  |  | +            where id = #{id}
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <insert id="insertCoreDrillDictionary" parameterType="com.xunmei.core.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="orgId != null">org_id,
 | 
	
		
			
				|  |  | +                    </if>
 | 
	
		
			
				|  |  | +                    <if test="orgName != null">org_name,
 | 
	
		
			
				|  |  | +                    </if>
 | 
	
		
			
				|  |  | +                    <if test="orgPath != null">org_path,
 | 
	
		
			
				|  |  | +                    </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="orgId != null">#{orgId},
 | 
	
		
			
				|  |  | +                    </if>
 | 
	
		
			
				|  |  | +                    <if test="orgName != null">#{orgName},
 | 
	
		
			
				|  |  | +                    </if>
 | 
	
		
			
				|  |  | +                    <if test="orgPath != null">#{orgPath},
 | 
	
		
			
				|  |  | +                    </if>
 | 
	
		
			
				|  |  | +                    <if test="deleted != null">#{deleted},
 | 
	
		
			
				|  |  | +                    </if>
 | 
	
		
			
				|  |  | +        </trim>
 | 
	
		
			
				|  |  | +    </insert>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <update id="updateCoreDrillDictionary" parameterType="com.xunmei.core.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="orgId != null">org_id =
 | 
	
		
			
				|  |  | +                        #{orgId},
 | 
	
		
			
				|  |  | +                    </if>
 | 
	
		
			
				|  |  | +                    <if test="orgName != null">org_name =
 | 
	
		
			
				|  |  | +                        #{orgName},
 | 
	
		
			
				|  |  | +                    </if>
 | 
	
		
			
				|  |  | +                    <if test="orgPath != null">org_path =
 | 
	
		
			
				|  |  | +                        #{orgPath},
 | 
	
		
			
				|  |  | +                    </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}
 | 
	
		
			
				|  |  | +    </delete>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <delete id="deleteCoreDrillDictionaryByIds" parameterType="String">
 | 
	
		
			
				|  |  | +        delete from core_drill_dictionary where id in
 | 
	
		
			
				|  |  | +        <foreach item="id" collection="array" open="(" separator="," close=")">
 | 
	
		
			
				|  |  | +            #{id}
 | 
	
		
			
				|  |  | +        </foreach>
 | 
	
		
			
				|  |  | +    </delete>
 | 
	
		
			
				|  |  | +</mapper>
 |