|
|
@@ -43,91 +43,6 @@
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
|
|
|
- <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>
|
|
|
- </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>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
-
|
|
|
- <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>
|
|
|
- </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>
|
|
|
<sql id="pageSql">
|
|
|
<if test="request.id != null">
|
|
|
and d.id like concat('%',#{request.id},'%')
|
|
|
@@ -171,24 +86,27 @@
|
|
|
)
|
|
|
</select>
|
|
|
<select id="selectPageData1" resultType="com.xunmei.common.core.domain.drill.vo.CoreDrillDictionaryPageVo">
|
|
|
- select * from core_drill_dictionary d inner join sys_dict_data dd on d.drill_type=dd.dict_value and
|
|
|
- dd.dict_type='core_drill_type' inner join sys_org o on d.org_id=o.id
|
|
|
+ select * from core_drill_dictionary d
|
|
|
+ <!-- inner join sys_dict_data dd on d.drill_type=dd.dict_value and dd.dict_type='core_drill_type'-->
|
|
|
+ inner join sys_org o on d.org_id=o.id
|
|
|
WHERE d.deleted=0 and o.deleted=0
|
|
|
<include refid="pageSql"/>
|
|
|
and d.org_id=#{request.orgId}
|
|
|
order by ifnull(o.sort,0)
|
|
|
</select>
|
|
|
<select id="selectPageData2" resultType="com.xunmei.common.core.domain.drill.vo.CoreDrillDictionaryPageVo">
|
|
|
- select * from core_drill_dictionary d inner join sys_dict_data dd on d.drill_type=dd.dict_value and
|
|
|
- dd.dict_type='core_drill_type' inner join sys_org o on d.org_id=o.id
|
|
|
+ select * from core_drill_dictionary d
|
|
|
+ <!--inner join sys_dict_data dd on d.drill_type=dd.dict_value and dd.dict_type='core_drill_type' -->
|
|
|
+ inner join sys_org o on d.org_id=o.id
|
|
|
WHERE d.deleted=0 and o.deleted=0
|
|
|
<include refid="pageSql"/>
|
|
|
and d.org_path like concat(#{request.orgPath},'%')
|
|
|
order by ifnull(o.sort,0)
|
|
|
</select>
|
|
|
<select id="selectPageData3" resultType="com.xunmei.common.core.domain.drill.vo.CoreDrillDictionaryPageVo">
|
|
|
- select * from core_drill_dictionary d inner join sys_dict_data dd on d.drill_type=dd.dict_value and
|
|
|
- dd.dict_type='core_drill_type' inner join sys_org o on d.org_id=o.id
|
|
|
+ select * from core_drill_dictionary d
|
|
|
+ <!--inner join sys_dict_data dd on d.drill_type=dd.dict_value and dd.dict_type='core_drill_type' -->
|
|
|
+ inner join sys_org o on d.org_id=o.id
|
|
|
WHERE d.deleted=0 and o.deleted=0
|
|
|
<include refid="pageSql"/>
|
|
|
and d.org_id in
|
|
|
@@ -198,8 +116,9 @@
|
|
|
order by ifnull(o.sort,0)
|
|
|
</select>
|
|
|
<select id="selectPageData4" resultType="com.xunmei.common.core.domain.drill.vo.CoreDrillDictionaryPageVo">
|
|
|
- select * from core_drill_dictionary d inner join sys_dict_data dd on d.drill_type=dd.dict_value and
|
|
|
- dd.dict_type='core_drill_type' inner join sys_org o on d.org_id=o.id
|
|
|
+ select * from core_drill_dictionary d
|
|
|
+ <!--inner join sys_dict_data dd on d.drill_type=dd.dict_value and dd.dict_type='core_drill_type' -->
|
|
|
+ inner join sys_org o on d.org_id=o.id
|
|
|
WHERE d.deleted=0 and o.deleted=0
|
|
|
<include refid="pageSql"/>
|
|
|
and (d.org_id in
|