<?xml version="1.0" encoding="gbk" standalone="no"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="" >
<!-- 	<typeAlias alias="Ywvideotaskcatalogbean" type="cn.vp.XXX.model.YwvideotaskcatalogBean"/> -->	<typeAlias alias="Ywvideotaskcatalog" type="cn.im.ywvideotaskcatalog.YwvideotaskcatalogBean"/>
	
	<sql id="condition_Ywvideotaskcatalog">
		where 1=1
		<isNotEmpty prepend='AND ' property='LIKEcatalogid'>
			(catalogid like '%$LIKEcatalogid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='catalogid'>
			(catalogid = #catalogid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEcatalogname'>
			(catalogname like '%$LIKEcatalogname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='catalogname'>
			(catalogname = #catalogname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEcatalogdescribe'>
			(catalogdescribe like '%$LIKEcatalogdescribe$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='catalogdescribe'>
			(catalogdescribe = #catalogdescribe# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEcatalogorder'>
			(catalogorder like '%$LIKEcatalogorder$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='catalogorder'>
			(catalogorder = #catalogorder# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEremarks'>
			(remarks like '%$LIKEremarks$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='remarks'>
			(remarks = #remarks# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEextend1'>
			(extend1 like '%$LIKEextend1$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='extend1'>
			(extend1 = #extend1# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEextend2'>
			(extend2 like '%$LIKEextend2$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='extend2'>
			(extend2 = #extend2# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEextend3'>
			(extend3 like '%$LIKEextend3$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='extend3'>
			(extend3 = #extend3# )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='LIKEextend4'>
			(extend4 like '%$LIKEextend4$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND ' property='extend4'>
			(extend4 = #extend4# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Ywvideotaskcatalog" parameterClass="java.util.Map">
		insert into 
		ywvideotaskcatalog(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='catalogid'>catalogid</isNotEmpty>
			<isNotEmpty prepend=',' property='catalogname'>catalogname</isNotEmpty>
			<isNotEmpty prepend=',' property='catalogdescribe'>catalogdescribe</isNotEmpty>
			<isNotEmpty prepend=',' property='catalogorder'>catalogorder</isNotEmpty>
			<isNotEmpty prepend=',' property='remarks'>remarks</isNotEmpty>
			<isNotEmpty prepend=',' property='extend1'>extend1</isNotEmpty>
			<isNotEmpty prepend=',' property='extend2'>extend2</isNotEmpty>
			<isNotEmpty prepend=',' property='extend3'>extend3</isNotEmpty>
			<isNotEmpty prepend=',' property='extend4'>extend4</isNotEmpty>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty prepend=',' property='catalogid'>#catalogid#</isNotEmpty>
			<isNotEmpty prepend=',' property='catalogname'>#catalogname#</isNotEmpty>
			<isNotEmpty prepend=',' property='catalogdescribe'>#catalogdescribe#</isNotEmpty>
			<isNotEmpty prepend=',' property='catalogorder'>#catalogorder#</isNotEmpty>
			<isNotEmpty prepend=',' property='remarks'>#remarks#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend1'>#extend1#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend2'>#extend2#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend3'>#extend3#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend4'>#extend4#</isNotEmpty>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_Ywvideotaskcatalog" parameterClass="java.util.Map">
		update ywvideotaskcatalog 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='catalogname'>catalogname=#catalogname#</isNotEmpty>
			<isNotEmpty prepend=',' property='catalogdescribe'>catalogdescribe=#catalogdescribe#</isNotEmpty>
			<isNotEmpty prepend=',' property='catalogorder'>catalogorder=#catalogorder#</isNotEmpty>
			<isNotEmpty prepend=',' property='remarks'>remarks=#remarks#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend1'>extend1=#extend1#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend2'>extend2=#extend2#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend3'>extend3=#extend3#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend4'>extend4=#extend4#</isNotEmpty>

		</dynamic>
		where catalogid = #XGTJcatalogid#
			<isNotEmpty prepend='AND ' property='XGTJcatalogname'> catalogname = #XGTJcatalogname# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJcatalogdescribe'> catalogdescribe = #XGTJcatalogdescribe# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJcatalogorder'> catalogorder = #XGTJcatalogorder# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJremarks'> remarks = #XGTJremarks# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJextend1'> extend1 = #XGTJextend1# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJextend2'> extend2 = #XGTJextend2# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJextend3'> extend3 = #XGTJextend3# </isNotEmpty>
			<isNotEmpty prepend='AND ' property='XGTJextend4'> extend4 = #XGTJextend4# </isNotEmpty>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Ywvideotaskcatalog" parameterClass="java.util.Map">
		delete from ywvideotaskcatalog 
		<include refid="condition_Ywvideotaskcatalog"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ywvideotaskcatalog" parameterClass="java.util.Map">
		delete from ywvideotaskcatalog 
		where 1=1
			<isNotEmpty prepend='AND ' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ywvideotaskcatalog" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			a.catalogid,a.catalogname,a.catalogdescribe,a.catalogorder,
			a.remarks,a.extend1,a.extend2,a.extend3,a.extend4
		from ywvideotaskcatalog a
		where 1=1 
		
		<isNotEmpty prepend='AND ' property='rulename'>
						a.catalogid in (
					select b.catalogid from ywvideotask b where 1=1 and
						(b.taskname like '%$rulename$%'  )
					)
		</isNotEmpty>	
		order by a.catalogname desc
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ywvideotaskcatalog" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ywvideotaskcatalog 
		<include refid="condition_Ywvideotaskcatalog"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ywvideotaskcatalog" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into ywvideotaskcatalog(
			 <![CDATA[ 
				catalogid,catalogname,catalogdescribe,catalogorder,remarks,extend1,extend2,extend3,extend4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].catalogid#,#list[].catalogname#,#list[].catalogdescribe#,#list[].catalogorder#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











