procdefinitionInitlinkDAO.xml 2.41 KB
Newer Older
陈玉兰 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
<?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.gaowj.business.procdefinitionInitlink.procdefinitionInitlinkDAO">
	<sql id="Where_Clause">
		<trim prefix="WHERE" prefixOverrides="AND |OR">
			<if test="UUID != null and UUID != ''">
				and f.UUID = #{UUID}
			</if>
			<if test="DEPLOYMENT_ID != null and DEPLOYMENT_ID != ''">
				and f.DEPLOYMENT_ID = #{DEPLOYMENT_ID}
			</if>
		</trim>
	</sql>
	
	<insert id="insert_procde_finition_init_link" parameterType="map">
	      insert into C_T_PROC_DEFINITION_INIT_LINK(
		<trim prefix="" suffixOverrides=",">
			<foreach collection="infoListKey" item="key">
				${key},
			</foreach>
		</trim>
	      <![CDATA[ ) values( ]]>
		<trim prefix="" suffixOverrides=",">
			<foreach collection="infoList" item="value">
				#{value},
			</foreach>
		</trim>
	      <![CDATA[ ) ]]>
	</insert>
	<update id="update_procde_finition_init_link" parameterType="map">
	 <![CDATA[
            update C_T_PROC_DEFINITION_INIT_LINK set 
         ]]>
		<trim prefix="" suffixOverrides=",">
			<foreach collection="info" item="info">
				${info.key} = #{info.value} ,
			</foreach>
		</trim>
		<where>
			<if test="UUID != null and UUID != ''">
				and UUID = #{UUID}
			</if>
		</where>
	</update>
	<select id="list_procde_finition_init_link" parameterType="map" resultType="upperCaseKeyMap">
	 <![CDATA[
	  select f.*
	  from C_T_PROC_DEFINITION_INIT_LINK f 
	  
     ]]>
		<include refid="Where_Clause" />
		order by f.CREATE_TIME DESC
	</select>
陈玉兰 committed
54 55 56 57 58 59
	<select id="listCount_procde_finition_init_link" parameterType="map" resultType="int">
	<![CDATA[
	select count(*) c from C_T_PROC_DEFINITION_INIT_LINK f 
	]]>
	<include refid="Where_Clause" />
	</select>
陈玉兰 committed
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
	
	<select id="list_procde_finition_init_link_byLinkKey" parameterType="list" resultType="upperCaseKeyMap">
	 	<![CDATA[
	  	select f.*
	  	from C_T_PROC_DEFINITION_INIT_LINK f where LINK_KEY IN
    	 ]]>
     	<foreach collection="list" item="LINK_KEY" open="(" separator=","
			close=")">
			#{LINK_KEY}
		</foreach>
		order by f.CREATE_TIME DESC
	</select>
	
	<delete id="delete_procde_finition_init_link_byLinkKey" parameterType="list">
        <![CDATA[
            delete from  C_T_PROC_DEFINITION_INIT_LINK where LINK_KEY IN
         ]]>
		<foreach collection="list" item="UUID" open="(" separator=","
			close=")">
			#{UUID}
		</foreach>
	</delete>
陈玉兰 committed
82
</mapper>