<?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="Ywvideotaskbean" type="cn.vp.XXX.model.YwvideotaskBean"/> -->	<typeAlias alias="Ywvideotask" type="cn.im.ywvideotask.YwvideotaskBean"/>
	
	<sql id="condition_Ywvideotask">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEtaskid'>
			(taskid like '%$LIKEtaskid$%' )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='taskid'>
			(taskid = #taskid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtaskname'>
			(taskname like '%$LIKEtaskname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='taskname'>
			(taskname = #taskname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtasktype'>
			(tasktype like '%$LIKEtasktype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tasktype'>
			(tasktype = #tasktype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtsaklevel'>
			(tsaklevel like '%$LIKEtsaklevel$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tsaklevel'>
			(tsaklevel = #tsaklevel# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtaskdescribe'>
			(taskdescribe like '%$LIKEtaskdescribe$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='taskdescribe'>
			(taskdescribe = #taskdescribe# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtaskmodel'>
			(taskmodel like '%$LIKEtaskmodel$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='taskmodel'>
			(taskmodel = #taskmodel# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdaystarttime'>
			(daystarttime like '%$LIKEdaystarttime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='daystarttime'>
			(daystarttime = #daystarttime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdaystarttimebyhour'>
			(daystarttimebyhour like '%$LIKEdaystarttimebyhour$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='daystarttimebyhour'>
			(daystarttimebyhour = #daystarttimebyhour# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchanneltotals'>
			(channeltotals like '%$LIKEchanneltotals$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channeltotals'>
			(channeltotals = #channeltotals# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmondayruntime'>
			(mondayruntime like '%$LIKEmondayruntime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='mondayruntime'>
			(mondayruntime = #mondayruntime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmondayrunbyhour'>
			(mondayrunbyhour like '%$LIKEmondayrunbyhour$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='mondayrunbyhour'>
			(mondayrunbyhour = #mondayrunbyhour# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtuesdayruntime'>
			(tuesdayruntime like '%$LIKEtuesdayruntime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tuesdayruntime'>
			(tuesdayruntime = #tuesdayruntime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtuesdayrunbyhour'>
			(tuesdayrunbyhour like '%$LIKEtuesdayrunbyhour$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tuesdayrunbyhour'>
			(tuesdayrunbyhour = #tuesdayrunbyhour# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEwednesdayuntime'>
			(wednesdayuntime like '%$LIKEwednesdayuntime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='wednesdayuntime'>
			(wednesdayuntime = #wednesdayuntime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEwednesdayunbyhour'>
			(wednesdayunbyhour like '%$LIKEwednesdayunbyhour$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='wednesdayunbyhour'>
			(wednesdayunbyhour = #wednesdayunbyhour# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthursdayruntime'>
			(thursdayruntime like '%$LIKEthursdayruntime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='thursdayruntime'>
			(thursdayruntime = #thursdayruntime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthursdayrunbyhour'>
			(thursdayrunbyhour like '%$LIKEthursdayrunbyhour$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='thursdayrunbyhour'>
			(thursdayrunbyhour = #thursdayrunbyhour# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfridayruntime'>
			(fridayruntime like '%$LIKEfridayruntime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fridayruntime'>
			(fridayruntime = #fridayruntime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfridayrunbyhour'>
			(fridayrunbyhour like '%$LIKEfridayrunbyhour$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fridayrunbyhour'>
			(fridayrunbyhour = #fridayrunbyhour# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsaturdatruntime'>
			(saturdatruntime like '%$LIKEsaturdatruntime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='saturdatruntime'>
			(saturdatruntime = #saturdatruntime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsaturdatrunbyhour'>
			(saturdatrunbyhour like '%$LIKEsaturdatrunbyhour$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='saturdatrunbyhour'>
			(saturdatrunbyhour = #saturdatrunbyhour# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsundayruntime'>
			(sundayruntime like '%$LIKEsundayruntime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sundayruntime'>
			(sundayruntime = #sundayruntime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsundayrunbyhour'>
			(sundayrunbyhour like '%$LIKEsundayrunbyhour$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sundayrunbyhour'>
			(sundayrunbyhour = #sundayrunbyhour# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmondayswitch'>
			(mondayswitch like '%$LIKEmondayswitch$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='mondayswitch'>
			(mondayswitch = #mondayswitch# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEtuesdayswitch'>
			(tuesdayswitch like '%$LIKEtuesdayswitch$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tuesdayswitch'>
			(tuesdayswitch = #tuesdayswitch# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEwednesdayswitch'>
			(wednesdayswitch like '%$LIKEwednesdayswitch$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='wednesdayswitch'>
			(wednesdayswitch = #wednesdayswitch# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEthursdayswitch'>
			(thursdayswitch like '%$LIKEthursdayswitch$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='thursdayswitch'>
			(thursdayswitch = #thursdayswitch# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEfridayswitch'>
			(fridayswitch like '%$LIKEfridayswitch$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='fridayswitch'>
			(fridayswitch = #fridayswitch# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsaturdayswitch'>
			(saturdayswitch like '%$LIKEsaturdayswitch$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='saturdayswitch'>
			(saturdayswitch = #saturdayswitch# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEsundayswitch'>
			(sundayswitch like '%$LIKEsundayswitch$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='sundayswitch'>
			(sundayswitch = #sundayswitch# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdetectionswitch'>
			(detectionswitch like '%$LIKEdetectionswitch$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='detectionswitch'>
			(detectionswitch = #detectionswitch# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdetectionstarttime'>
			(detectionstarttime like '%$LIKEdetectionstarttime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='detectionstarttime'>
			(detectionstarttime = #detectionstarttime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreateaccount'>
			(createaccount like '%$LIKEcreateaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createaccount'>
			(createaccount = #createaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcreatetime'>
			(createtime like '%$LIKEcreatetime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createtime'>
			(createtime = #createtime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmodifyaccount'>
			(modifyaccount like '%$LIKEmodifyaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='modifyaccount'>
			(modifyaccount = #modifyaccount# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEmodifytime'>
			(modifytime like '%$LIKEmodifytime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='modifytime'>
			(modifytime = #modifytime# )
		</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_Ywvideotask" parameterClass="java.util.Map">
		insert into 
		ywvideotask(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='catalogid'>catalogid</isNotEmpty>
			<isNotEmpty prepend=',' property='catalogname'>catalogname</isNotEmpty>
			<isNotEmpty prepend=',' property='taskid'>taskid</isNotEmpty>
			<isNotEmpty prepend=',' property='taskname'>taskname</isNotEmpty>
			<isNotEmpty prepend=',' property='tasktype'>tasktype</isNotEmpty>
			<isNotEmpty prepend=',' property='tsaklevel'>tsaklevel</isNotEmpty>
			<isNotEmpty prepend=',' property='taskdescribe'>taskdescribe</isNotEmpty>
			<isNotEmpty prepend=',' property='taskmodel'>taskmodel</isNotEmpty>
			<isNotEmpty prepend=',' property='daystarttime'>daystarttime</isNotEmpty>
			<isNotEmpty prepend=',' property='daystarttimebyhour'>daystarttimebyhour</isNotEmpty>
			<isNotEmpty prepend=',' property='channeltotals'>channeltotals</isNotEmpty>
			<isNotEmpty prepend=',' property='mondayruntime'>mondayruntime</isNotEmpty>
			<isNotEmpty prepend=',' property='mondayrunbyhour'>mondayrunbyhour</isNotEmpty>
			<isNotEmpty prepend=',' property='tuesdayruntime'>tuesdayruntime</isNotEmpty>
			<isNotEmpty prepend=',' property='tuesdayrunbyhour'>tuesdayrunbyhour</isNotEmpty>
			<isNotEmpty prepend=',' property='wednesdayuntime'>wednesdayuntime</isNotEmpty>
			<isNotEmpty prepend=',' property='wednesdayunbyhour'>wednesdayunbyhour</isNotEmpty>
			<isNotEmpty prepend=',' property='thursdayruntime'>thursdayruntime</isNotEmpty>
			<isNotEmpty prepend=',' property='thursdayrunbyhour'>thursdayrunbyhour</isNotEmpty>
			<isNotEmpty prepend=',' property='fridayruntime'>fridayruntime</isNotEmpty>
			<isNotEmpty prepend=',' property='fridayrunbyhour'>fridayrunbyhour</isNotEmpty>
			<isNotEmpty prepend=',' property='saturdatruntime'>saturdatruntime</isNotEmpty>
			<isNotEmpty prepend=',' property='saturdatrunbyhour'>saturdatrunbyhour</isNotEmpty>
			<isNotEmpty prepend=',' property='sundayruntime'>sundayruntime</isNotEmpty>
			<isNotEmpty prepend=',' property='sundayrunbyhour'>sundayrunbyhour</isNotEmpty>
			<isNotEmpty prepend=',' property='mondayswitch'>mondayswitch</isNotEmpty>
			<isNotEmpty prepend=',' property='tuesdayswitch'>tuesdayswitch</isNotEmpty>
			<isNotEmpty prepend=',' property='wednesdayswitch'>wednesdayswitch</isNotEmpty>
			<isNotEmpty prepend=',' property='thursdayswitch'>thursdayswitch</isNotEmpty>
			<isNotEmpty prepend=',' property='fridayswitch'>fridayswitch</isNotEmpty>
			<isNotEmpty prepend=',' property='saturdayswitch'>saturdayswitch</isNotEmpty>
			<isNotEmpty prepend=',' property='sundayswitch'>sundayswitch</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionswitch'>detectionswitch</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionstarttime'>detectionstarttime</isNotEmpty>
			<isNotEmpty prepend=',' property='createaccount'>createaccount</isNotEmpty>
			<isNotEmpty prepend=',' property='createtime'>createtime</isNotEmpty>
			<isNotEmpty prepend=',' property='modifyaccount'>modifyaccount</isNotEmpty>
			<isNotEmpty prepend=',' property='modifytime'>modifytime</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='taskid'>#taskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='taskname'>#taskname#</isNotEmpty>
			<isNotEmpty prepend=',' property='tasktype'>#tasktype#</isNotEmpty>
			<isNotEmpty prepend=',' property='tsaklevel'>#tsaklevel#</isNotEmpty>
			<isNotEmpty prepend=',' property='taskdescribe'>#taskdescribe#</isNotEmpty>
			<isNotEmpty prepend=',' property='taskmodel'>#taskmodel#</isNotEmpty>
			<isNotEmpty prepend=',' property='daystarttime'>#daystarttime#</isNotEmpty>
			<isNotEmpty prepend=',' property='daystarttimebyhour'>#daystarttimebyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='channeltotals'>#channeltotals#</isNotEmpty>
			<isNotEmpty prepend=',' property='mondayruntime'>#mondayruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='mondayrunbyhour'>#mondayrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='tuesdayruntime'>#tuesdayruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='tuesdayrunbyhour'>#tuesdayrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='wednesdayuntime'>#wednesdayuntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='wednesdayunbyhour'>#wednesdayunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='thursdayruntime'>#thursdayruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='thursdayrunbyhour'>#thursdayrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='fridayruntime'>#fridayruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='fridayrunbyhour'>#fridayrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='saturdatruntime'>#saturdatruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='saturdatrunbyhour'>#saturdatrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='sundayruntime'>#sundayruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='sundayrunbyhour'>#sundayrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='mondayswitch'>#mondayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='tuesdayswitch'>#tuesdayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='wednesdayswitch'>#wednesdayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='thursdayswitch'>#thursdayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='fridayswitch'>#fridayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='saturdayswitch'>#saturdayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='sundayswitch'>#sundayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionswitch'>#detectionswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionstarttime'>#detectionstarttime#</isNotEmpty>
			<isNotEmpty prepend=',' property='createaccount'>#createaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='createtime'>#createtime#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifyaccount'>#modifyaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifytime'>#modifytime#</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_Ywvideotask" parameterClass="java.util.Map">
		update ywvideotask 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='taskname'>taskname=#taskname#</isNotEmpty>
			<isNotEmpty prepend=',' property='tasktype'>tasktype=#tasktype#</isNotEmpty>
			<isNotEmpty prepend=',' property='tsaklevel'>tsaklevel=#tsaklevel#</isNotEmpty>
			<isNotEmpty prepend=',' property='taskdescribe'>taskdescribe=#taskdescribe#</isNotEmpty>
			<isNotEmpty prepend=',' property='taskmodel'>taskmodel=#taskmodel#</isNotEmpty>
			<isNotEmpty prepend=',' property='daystarttime'>daystarttime=#daystarttime#</isNotEmpty>
			<isNotEmpty prepend=',' property='daystarttimebyhour'>daystarttimebyhour=#daystarttimebyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='channeltotals'>channeltotals=#channeltotals#</isNotEmpty>
			<isNotEmpty prepend=',' property='mondayruntime'>mondayruntime=#mondayruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='mondayrunbyhour'>mondayrunbyhour=#mondayrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='tuesdayruntime'>tuesdayruntime=#tuesdayruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='tuesdayrunbyhour'>tuesdayrunbyhour=#tuesdayrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='wednesdayuntime'>wednesdayuntime=#wednesdayuntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='wednesdayunbyhour'>wednesdayunbyhour=#wednesdayunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='thursdayruntime'>thursdayruntime=#thursdayruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='thursdayrunbyhour'>thursdayrunbyhour=#thursdayrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='fridayruntime'>fridayruntime=#fridayruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='fridayrunbyhour'>fridayrunbyhour=#fridayrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='saturdatruntime'>saturdatruntime=#saturdatruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='saturdatrunbyhour'>saturdatrunbyhour=#saturdatrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='sundayruntime'>sundayruntime=#sundayruntime#</isNotEmpty>
			<isNotEmpty prepend=',' property='sundayrunbyhour'>sundayrunbyhour=#sundayrunbyhour#</isNotEmpty>
			<isNotEmpty prepend=',' property='mondayswitch'>mondayswitch=#mondayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='tuesdayswitch'>tuesdayswitch=#tuesdayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='wednesdayswitch'>wednesdayswitch=#wednesdayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='thursdayswitch'>thursdayswitch=#thursdayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='fridayswitch'>fridayswitch=#fridayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='saturdayswitch'>saturdayswitch=#saturdayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='sundayswitch'>sundayswitch=#sundayswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionswitch'>detectionswitch=#detectionswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionstarttime'>detectionstarttime=#detectionstarttime#</isNotEmpty>
			<isNotEmpty prepend=',' property='createaccount'>createaccount=#createaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='createtime'>createtime=#createtime#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifyaccount'>modifyaccount=#modifyaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifytime'>modifytime=#modifytime#</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>
			<isNotEmpty prepend=',' property='channelsetid'>channelsetid=#channelsetid#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelsetname'>channelsetname=#channelsetname#</isNotEmpty>

		</dynamic>
		where 1=1 
			<isNotEmpty prepend='AND' property='XGTJcatalogid'> catalogid = #XGTJcatalogid#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtaskid'> taskid = #XGTJtaskid#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtaskname'> taskname = #XGTJtaskname# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtasktype'> tasktype = #XGTJtasktype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtsaklevel'> tsaklevel = #XGTJtsaklevel# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtaskdescribe'> taskdescribe = #XGTJtaskdescribe# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtaskmodel'> taskmodel = #XGTJtaskmodel# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdaystarttime'> daystarttime = #XGTJdaystarttime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdaystarttimebyhour'> daystarttimebyhour = #XGTJdaystarttimebyhour# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJchanneltotals'> channeltotals = #XGTJchanneltotals# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmondayruntime'> mondayruntime = #XGTJmondayruntime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmondayrunbyhour'> mondayrunbyhour = #XGTJmondayrunbyhour# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtuesdayruntime'> tuesdayruntime = #XGTJtuesdayruntime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtuesdayrunbyhour'> tuesdayrunbyhour = #XGTJtuesdayrunbyhour# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJwednesdayuntime'> wednesdayuntime = #XGTJwednesdayuntime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJwednesdayunbyhour'> wednesdayunbyhour = #XGTJwednesdayunbyhour# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJthursdayruntime'> thursdayruntime = #XGTJthursdayruntime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJthursdayrunbyhour'> thursdayrunbyhour = #XGTJthursdayrunbyhour# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfridayruntime'> fridayruntime = #XGTJfridayruntime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfridayrunbyhour'> fridayrunbyhour = #XGTJfridayrunbyhour# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsaturdatruntime'> saturdatruntime = #XGTJsaturdatruntime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsaturdatrunbyhour'> saturdatrunbyhour = #XGTJsaturdatrunbyhour# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsundayruntime'> sundayruntime = #XGTJsundayruntime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsundayrunbyhour'> sundayrunbyhour = #XGTJsundayrunbyhour# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmondayswitch'> mondayswitch = #XGTJmondayswitch# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJtuesdayswitch'> tuesdayswitch = #XGTJtuesdayswitch# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJwednesdayswitch'> wednesdayswitch = #XGTJwednesdayswitch# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJthursdayswitch'> thursdayswitch = #XGTJthursdayswitch# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJfridayswitch'> fridayswitch = #XGTJfridayswitch# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsaturdayswitch'> saturdayswitch = #XGTJsaturdayswitch# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJsundayswitch'> sundayswitch = #XGTJsundayswitch# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdetectionswitch'> detectionswitch = #XGTJdetectionswitch# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdetectionstarttime'> detectionstarttime = #XGTJdetectionstarttime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcreateaccount'> createaccount = #XGTJcreateaccount# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcreatetime'> createtime = #XGTJcreatetime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmodifyaccount'> modifyaccount = #XGTJmodifyaccount# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJmodifytime'> modifytime = #XGTJmodifytime# </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_Ywvideotask" parameterClass="java.util.Map">
		delete from ywvideotask 
		<include refid="condition_Ywvideotask"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ywvideotask_bak" parameterClass="java.util.Map">
		delete from ywvideotask 
		where 1=1 
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	<delete id="batch_delete_Ywvideotask" parameterClass="java.util.List">
		delete from ywvideotask 
		where 1=1 and taskid in 
		<iterate open="(" close=")" conjunction=" ," > 
			#list[]#
	    </iterate> 
	</delete>
	<update id="batch_update_Ywvideotask" parameterClass="java.util.Map">
		update ywvideotask
		<dynamic prepend="set ">   
			<isNotEmpty prepend=',' property='detectionstarttime'>detectionstarttime=#detectionstarttime#</isNotEmpty>
			<isNotEmpty prepend=',' property='detectionswitch'>detectionswitch=#detectionswitch#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifyaccount'>modifyaccount=#modifyaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifytime'>modifytime=#modifytime#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend1'>extend1=#extend1#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend3'>extend3=#extend3#</isNotEmpty>
			<isNotEmpty prepend=',' property='extend4'>extend4=#extend4#</isNotEmpty>

		</dynamic>
		where 1=1 
			<isNotEmpty prepend='AND' property='keyword'>
				 taskid  in 
				<iterate  open="(" close=")" conjunction="," property="keyword"> 
				
					#keyword[]#
		    	</iterate> 
	    	
			</isNotEmpty>
	</update>
	<update id="delete_channelset_Ywvideotask" parameterClass="java.util.Map">
		update ywvideotask set channelsetid='',channelsetname=''
			<isNotEmpty prepend=',' property='modifyaccount'>modifyaccount=#modifyaccount#</isNotEmpty>
			<isNotEmpty prepend=',' property='modifytime'>modifytime=#modifytime#</isNotEmpty>
		where 1=1 
			<isNotEmpty prepend='AND' property='taskid'>
	    		taskid = #taskid#
			</isNotEmpty>
	</update>
	<!-- query objects by page-->
	<select id="query_Ywvideotask_children" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			b.catalogid,b.catalogname,b.taskid,b.taskname,b.tasktype,b.tsaklevel,b.taskdescribe,b.taskmodel,
			b.daystarttime,b.daystarttimebyhour,b.channeltotals,b.mondayruntime,
			b.mondayrunbyhour,b.tuesdayruntime,b.tuesdayrunbyhour,b.wednesdayuntime,
			b.wednesdayunbyhour,b.thursdayruntime,b.thursdayrunbyhour,b.fridayruntime,
			b.fridayrunbyhour,b.saturdatruntime,b.saturdatrunbyhour,b.sundayruntime,b.sundayrunbyhour,
			b.mondayswitch,b.tuesdayswitch,b.wednesdayswitch,b.thursdayswitch,b.fridayswitch,b.saturdayswitch,
			b.sundayswitch,b.detectionswitch,b.detectionstarttime,b.createaccount,b.createtime,b.modifyaccount,
			b.modifytime,b.remarks,b.extend1,b.extend2,b.extend3,b.extend4,
			(select csmc from xtcl where csdl='ywTaskEnable' and csdm=detectionswitch) as  detectionswitchname
		from ywvideotask b
		where 1=1
		<isNotEmpty prepend='AND' property='catalogid'>
			(b.catalogid = #catalogid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='taskname'>
			(b.taskname like '%$taskname$%'  ) 
		</isNotEmpty>
		order by 	createtime desc
	</select>
	<select id="query_Ywvideotask" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			b.catalogid,b.catalogname,b.taskid,b.taskname,
			b.tasktype,(select csmc from xtcl a where a.csdl='ywVideoTaskType' and a.csdm=b.tasktype) as tasktypename,
			b.tsaklevel,(select csmc from xtcl a where a.csdl='ywVideoTaskLevel' and a.csdm=b.tsaklevel) as tsaklevelname,
			b.taskmodel,(select csmc from xtcl a where a.csdl='ywVideoTaskModel' and a.csdm=b.taskmodel) as taskmodelname,
			b.taskdescribe, b.daystarttime,b.daystarttimebyhour,b.channeltotals,b.mondayruntime,
			b.mondayrunbyhour,b.tuesdayruntime,b.tuesdayrunbyhour,b.wednesdayuntime,
			b.wednesdayunbyhour,b.thursdayruntime,b.thursdayrunbyhour,b.fridayruntime,
			b.fridayrunbyhour,b.saturdatruntime,b.saturdatrunbyhour,b.sundayruntime,b.sundayrunbyhour,
			b.mondayswitch,b.tuesdayswitch,b.wednesdayswitch,b.thursdayswitch,b.fridayswitch,b.saturdayswitch,
			b.sundayswitch,b.detectionswitch,b.detectionstarttime,b.createaccount,b.createtime,b.modifyaccount,
			b.modifytime,b.remarks,
			b.extend1,(select csmc from xtcl a where a.csdl='nhywVideotaskApproveStatus' and a.csdm=b.extend1) as extend1name,
			b.extend2,b.extend3,b.extend4,
			(select csmc from xtcl where csdl='ywTaskEnable' and csdm=detectionswitch) as  detectionswitchname,
			b.channelsetid,b.channelsetname,
			c.ruleid
		from ywvideotask b left join ywvideotaskrule c on c.taskid=b.taskid
		where 1=1
		
		<isNotEmpty prepend='AND' property='taskname'>
			(b.taskname like '%$taskname$%'  ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tasktype'>
			(b.tasktype = $tasktype$  ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tsaklevel'>
			(b.tsaklevel = $tsaklevel$  ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='taskmodel'>
			(b.taskmodel = $taskmodel$  ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='detectionswitch'>
			(b.detectionswitch = $detectionswitch$  ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='createaccount'>
			(b.createaccount = #createaccount# ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend2'>
			(b.extend2 = #extend2# ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend1'>
			(b.extend1 = #extend1# ) 
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
		<!-- <isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty> -->
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ywvideotask" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*)
		from ywvideotask b
		where 1=1
		
		<isNotEmpty prepend='AND' property='taskname'>
			(b.taskname like '%$taskname$%'  ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tasktype'>
			(b.tasktype = $tasktype$  ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='tsaklevel'>
			(b.tsaklevel = $tsaklevel$  ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='taskmodel'>
			(b.taskmodel = $taskmodel$  ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='detectionswitch'>
			(b.detectionswitch = $detectionswitch$  ) 
		</isNotEmpty>			
		<isNotEmpty prepend='AND' property='extend2'>
			(b.extend2 = #extend2# ) 
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='extend1'>
			(b.extend1 = #extend1# ) 
		</isNotEmpty>
	</select>

	<select id="getApproveUser" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		 select a.yhbh,a.sjhm,a.yhmc,a.yhzh from ptyh a,ywuserrolerelation b 
		where a.yhbh = b.usernum and b.isapprovalauthory=1
	</select>

	<!-- batch add objects -->
	<insert id="batch_insert_Ywvideotask" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into ywvideotask(
			 <![CDATA[ 
				taskid,taskname,tasktype,tsaklevel,taskdescribe,taskmodel,daystarttime,daystarttimebyhour,channeltotals,mondayruntime,mondayrunbyhour,tuesdayruntime,tuesdayrunbyhour,wednesdayuntime,wednesdayunbyhour,thursdayruntime,thursdayrunbyhour,fridayruntime,fridayrunbyhour,saturdatruntime,saturdatrunbyhour,sundayruntime,sundayrunbyhour,mondayswitch,tuesdayswitch,wednesdayswitch,thursdayswitch,fridayswitch,saturdayswitch,sundayswitch,detectionswitch,detectionstarttime,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].taskid#,#list[].taskname#,#list[].tasktype#,#list[].tsaklevel#,#list[].taskdescribe#,#list[].taskmodel#,#list[].daystarttime#,#list[].daystarttimebyhour#,#list[].channeltotals#,#list[].mondayruntime#,#list[].mondayrunbyhour#,#list[].tuesdayruntime#,#list[].tuesdayrunbyhour#,#list[].wednesdayuntime#,#list[].wednesdayunbyhour#,#list[].thursdayruntime#,#list[].thursdayrunbyhour#,#list[].fridayruntime#,#list[].fridayrunbyhour#,#list[].saturdatruntime#,#list[].saturdatrunbyhour#,#list[].sundayruntime#,#list[].sundayrunbyhour#,#list[].mondayswitch#,#list[].tuesdayswitch#,#list[].wednesdayswitch#,#list[].thursdayswitch#,#list[].fridayswitch#,#list[].saturdayswitch#,#list[].sundayswitch#,#list[].detectionswitch#,#list[].detectionstarttime#,#list[].createaccount#,#list[].createtime#,#list[].modifyaccount#,#list[].modifytime#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











