<?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="Ywvideohistorystatebean" type="cn.vp.XXX.model.YwvideohistorystateBean"/> -->	<typeAlias alias="Ywvideohistorystate" type="cn.yw.ywvideohistorystate.YwvideohistorystateBean"/>
	
	<sql id="condition_Ywvideohistorystate">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEhistorystateid'>
			(historystateid like '%$LIKEhistorystateid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='historystateid'>
			(historystateid = #historystateid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcurrentstateid'>
			(currentstateid like '%$LIKEcurrentstateid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='currentstateid'>
			(currentstateid = #currentstateid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideonum'>
			(videonum like '%$LIKEvideonum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videonum'>
			(videonum = #videonum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelnum'>
			(channelnum like '%$LIKEchannelnum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelnum'>
			(channelnum = #channelnum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelname'>
			(channelname like '%$LIKEchannelname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelname'>
			(channelname = #channelname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideocatalog'>
			(videocatalog like '%$LIKEvideocatalog$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videocatalog'>
			(videocatalog = #videocatalog# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcurrentstate'>
			(currentstate like '%$LIKEcurrentstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='currentstate'>
			(currentstate = #currentstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcurrentstatetime'>
			(currentstatetime like '%$LIKEcurrentstatetime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='currentstatetime'>
			(currentstatetime = #currentstatetime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEisonline'>
			(isonline like '%$LIKEisonline$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='isonline'>
			(isonline = #isonline# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEplayfail'>
			(playfail like '%$LIKEplayfail$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='playfail'>
			(playfail = #playfail# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnetworkerror'>
			(networkerror like '%$LIKEnetworkerror$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='networkerror'>
			(networkerror = #networkerror# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvqcstate'>
			(vqcstate like '%$LIKEvqcstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='vqcstate'>
			(vqcstate = #vqcstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvqcfailuretype'>
			(vqcfailuretype like '%$LIKEvqcfailuretype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='vqcfailuretype'>
			(vqcfailuretype = #vqcfailuretype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvqcfailurecause'>
			(vqcfailurecause like '%$LIKEvqcfailurecause$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='vqcfailurecause'>
			(vqcfailurecause = #vqcfailurecause# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvqctaskid'>
			(vqctaskid like '%$LIKEvqctaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='vqctaskid'>
			(vqctaskid = #vqctaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvqdstate'>
			(vqdstate like '%$LIKEvqdstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='vqdstate'>
			(vqdstate = #vqdstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEnosignalstatus'>
			(nosignalstatus like '%$LIKEnosignalstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='nosignalstatus'>
			(nosignalstatus = #nosignalstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimgclearstatus'>
			(imgclearstatus like '%$LIKEimgclearstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imgclearstatus'>
			(imgclearstatus = #imgclearstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimgcontraststatus'>
			(imgcontraststatus like '%$LIKEimgcontraststatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imgcontraststatus'>
			(imgcontraststatus = #imgcontraststatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimgcolorstatus'>
			(imgcolorstatus like '%$LIKEimgcolorstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imgcolorstatus'>
			(imgcolorstatus = #imgcolorstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEimglightstatus'>
			(imglightstatus like '%$LIKEimglightstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='imglightstatus'>
			(imglightstatus = #imglightstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideofreezestatus'>
			(videofreezestatus like '%$LIKEvideofreezestatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videofreezestatus'>
			(videofreezestatus = #videofreezestatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideojitterstatus'>
			(videojitterstatus like '%$LIKEvideojitterstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videojitterstatus'>
			(videojitterstatus = #videojitterstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideoupheavalstatus'>
			(videoupheavalstatus like '%$LIKEvideoupheavalstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videoupheavalstatus'>
			(videoupheavalstatus = #videoupheavalstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideocodeerrorstatus'>
			(videocodeerrorstatus like '%$LIKEvideocodeerrorstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videocodeerrorstatus'>
			(videocodeerrorstatus = #videocodeerrorstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideonoisestatus'>
			(videonoisestatus like '%$LIKEvideonoisestatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videonoisestatus'>
			(videonoisestatus = #videonoisestatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideorollstripestatus'>
			(videorollstripestatus like '%$LIKEvideorollstripestatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videorollstripestatus'>
			(videorollstripestatus = #videorollstripestatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideostatus'>
			(videostatus like '%$LIKEvideostatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videostatus'>
			(videostatus = #videostatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideofailurecause'>
			(videofailurecause like '%$LIKEvideofailurecause$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videofailurecause'>
			(videofailurecause = #videofailurecause# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvqdtaskid'>
			(vqdtaskid like '%$LIKEvqdtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='vqdtaskid'>
			(vqdtaskid = #vqdtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordstate'>
			(recordstate like '%$LIKErecordstate$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordstate'>
			(recordstate = #recordstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordfailuretype'>
			(recordfailuretype like '%$LIKErecordfailuretype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordfailuretype'>
			(recordfailuretype = #recordfailuretype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordfailurecause'>
			(recordfailurecause like '%$LIKErecordfailurecause$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordfailurecause'>
			(recordfailurecause = #recordfailurecause# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKErecordtaskid'>
			(recordtaskid like '%$LIKErecordtaskid$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordtaskid'>
			(recordtaskid = #recordtaskid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideolabelstatus'>
			(videolabelstatus like '%$LIKEvideolabelstatus$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videolabelstatus'>
			(videolabelstatus = #videolabelstatus# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideolabeltime'>
			(videolabeltime like '%$LIKEvideolabeltime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videolabeltime'>
			(videolabeltime = #videolabeltime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideolabelaccount'>
			(videolabelaccount like '%$LIKEvideolabelaccount$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videolabelaccount'>
			(videolabelaccount = #videolabelaccount# )
		</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_Ywvideohistorystate" parameterClass="java.util.Map">
		insert into 
		ywvideohistorystate(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='historystateid'>historystateid</isNotEmpty>
			<isNotEmpty prepend=',' property='currentstateid'>currentstateid</isNotEmpty>
			<isNotEmpty prepend=',' property='videonum'>videonum</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>channelnum</isNotEmpty>
			<isNotEmpty prepend=',' property='channelname'>channelname</isNotEmpty>
			<isNotEmpty prepend=',' property='videocatalog'>videocatalog</isNotEmpty>
			<isNotEmpty prepend=',' property='currentstate'>currentstate</isNotEmpty>
			<isNotEmpty prepend=',' property='currentstatetime'>currentstatetime</isNotEmpty>
			<isNotEmpty prepend=',' property='isonline'>isonline</isNotEmpty>
			<isNotEmpty prepend=',' property='playfail'>playfail</isNotEmpty>
			<isNotEmpty prepend=',' property='networkerror'>networkerror</isNotEmpty>
			<isNotEmpty prepend=',' property='vqcstate'>vqcstate</isNotEmpty>
			<isNotEmpty prepend=',' property='vqcfailuretype'>vqcfailuretype</isNotEmpty>
			<isNotEmpty prepend=',' property='vqcfailurecause'>vqcfailurecause</isNotEmpty>
			<isNotEmpty prepend=',' property='vqctaskid'>vqctaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='vqdstate'>vqdstate</isNotEmpty>
			<isNotEmpty prepend=',' property='nosignalstatus'>nosignalstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='imgclearstatus'>imgclearstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcontraststatus'>imgcontraststatus</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcolorstatus'>imgcolorstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='imglightstatus'>imglightstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videofreezestatus'>videofreezestatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videojitterstatus'>videojitterstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videoupheavalstatus'>videoupheavalstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videocodeerrorstatus'>videocodeerrorstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videonoisestatus'>videonoisestatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videorollstripestatus'>videorollstripestatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videostatus'>videostatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videofailurecause'>videofailurecause</isNotEmpty>
			<isNotEmpty prepend=',' property='vqdtaskid'>vqdtaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='recordstate'>recordstate</isNotEmpty>
			<isNotEmpty prepend=',' property='recordfailuretype'>recordfailuretype</isNotEmpty>
			<isNotEmpty prepend=',' property='recordfailurecause'>recordfailurecause</isNotEmpty>
			<isNotEmpty prepend=',' property='recordtaskid'>recordtaskid</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabelstatus'>videolabelstatus</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabeltime'>videolabeltime</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabelaccount'>videolabelaccount</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='historystateid'>#historystateid#</isNotEmpty>
			<isNotEmpty prepend=',' property='currentstateid'>#currentstateid#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonum'>#videonum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>#channelnum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelname'>#channelname#</isNotEmpty>
			<isNotEmpty prepend=',' property='videocatalog'>#videocatalog#</isNotEmpty>
			<isNotEmpty prepend=',' property='currentstate'>#currentstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='currentstatetime'>#currentstatetime#</isNotEmpty>
			<isNotEmpty prepend=',' property='isonline'>#isonline#</isNotEmpty>
			<isNotEmpty prepend=',' property='playfail'>#playfail#</isNotEmpty>
			<isNotEmpty prepend=',' property='networkerror'>#networkerror#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqcstate'>#vqcstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqcfailuretype'>#vqcfailuretype#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqcfailurecause'>#vqcfailurecause#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqctaskid'>#vqctaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqdstate'>#vqdstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='nosignalstatus'>#nosignalstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgclearstatus'>#imgclearstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcontraststatus'>#imgcontraststatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcolorstatus'>#imgcolorstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imglightstatus'>#imglightstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videofreezestatus'>#videofreezestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videojitterstatus'>#videojitterstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videoupheavalstatus'>#videoupheavalstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videocodeerrorstatus'>#videocodeerrorstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonoisestatus'>#videonoisestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videorollstripestatus'>#videorollstripestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videostatus'>#videostatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videofailurecause'>#videofailurecause#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqdtaskid'>#vqdtaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordstate'>#recordstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordfailuretype'>#recordfailuretype#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordfailurecause'>#recordfailurecause#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordtaskid'>#recordtaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabelstatus'>#videolabelstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabeltime'>#videolabeltime#</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabelaccount'>#videolabelaccount#</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_Ywvideohistorystate" parameterClass="java.util.Map">
		update ywvideohistorystate 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='currentstateid'>currentstateid=#currentstateid#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonum'>videonum=#videonum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelnum'>channelnum=#channelnum#</isNotEmpty>
			<isNotEmpty prepend=',' property='channelname'>channelname=#channelname#</isNotEmpty>
			<isNotEmpty prepend=',' property='videocatalog'>videocatalog=#videocatalog#</isNotEmpty>
			<isNotEmpty prepend=',' property='currentstate'>currentstate=#currentstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='currentstatetime'>currentstatetime=#currentstatetime#</isNotEmpty>
			<isNotEmpty prepend=',' property='isonline'>isonline=#isonline#</isNotEmpty>
			<isNotEmpty prepend=',' property='playfail'>playfail=#playfail#</isNotEmpty>
			<isNotEmpty prepend=',' property='networkerror'>networkerror=#networkerror#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqcstate'>vqcstate=#vqcstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqcfailuretype'>vqcfailuretype=#vqcfailuretype#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqcfailurecause'>vqcfailurecause=#vqcfailurecause#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqctaskid'>vqctaskid=#vqctaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqdstate'>vqdstate=#vqdstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='nosignalstatus'>nosignalstatus=#nosignalstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgclearstatus'>imgclearstatus=#imgclearstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcontraststatus'>imgcontraststatus=#imgcontraststatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imgcolorstatus'>imgcolorstatus=#imgcolorstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='imglightstatus'>imglightstatus=#imglightstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videofreezestatus'>videofreezestatus=#videofreezestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videojitterstatus'>videojitterstatus=#videojitterstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videoupheavalstatus'>videoupheavalstatus=#videoupheavalstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videocodeerrorstatus'>videocodeerrorstatus=#videocodeerrorstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videonoisestatus'>videonoisestatus=#videonoisestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videorollstripestatus'>videorollstripestatus=#videorollstripestatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videostatus'>videostatus=#videostatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videofailurecause'>videofailurecause=#videofailurecause#</isNotEmpty>
			<isNotEmpty prepend=',' property='vqdtaskid'>vqdtaskid=#vqdtaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordstate'>recordstate=#recordstate#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordfailuretype'>recordfailuretype=#recordfailuretype#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordfailurecause'>recordfailurecause=#recordfailurecause#</isNotEmpty>
			<isNotEmpty prepend=',' property='recordtaskid'>recordtaskid=#recordtaskid#</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabelstatus'>videolabelstatus=#videolabelstatus#</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabeltime'>videolabeltime=#videolabeltime#</isNotEmpty>
			<isNotEmpty prepend=',' property='videolabelaccount'>videolabelaccount=#videolabelaccount#</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>

		</dynamic>
		where 1=1 
			<isNotEmpty prepend='AND' property='XGTJhistorystateid'> historystateid = #XGTJhistorystateid#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcurrentstateid'> currentstateid = #XGTJcurrentstateid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideonum'> videonum = #XGTJvideonum# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJchannelnum'> channelnum = #XGTJchannelnum# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJchannelname'> channelname = #XGTJchannelname# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideocatalog'> videocatalog = #XGTJvideocatalog# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcurrentstate'> currentstate = #XGTJcurrentstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJcurrentstatetime'> currentstatetime = #XGTJcurrentstatetime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJisonline'> isonline = #XGTJisonline# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJplayfail'> playfail = #XGTJplayfail# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJnetworkerror'> networkerror = #XGTJnetworkerror# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvqcstate'> vqcstate = #XGTJvqcstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvqcfailuretype'> vqcfailuretype = #XGTJvqcfailuretype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvqcfailurecause'> vqcfailurecause = #XGTJvqcfailurecause# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvqctaskid'> vqctaskid = #XGTJvqctaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvqdstate'> vqdstate = #XGTJvqdstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJnosignalstatus'> nosignalstatus = #XGTJnosignalstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimgclearstatus'> imgclearstatus = #XGTJimgclearstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimgcontraststatus'> imgcontraststatus = #XGTJimgcontraststatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimgcolorstatus'> imgcolorstatus = #XGTJimgcolorstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJimglightstatus'> imglightstatus = #XGTJimglightstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideofreezestatus'> videofreezestatus = #XGTJvideofreezestatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideojitterstatus'> videojitterstatus = #XGTJvideojitterstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideoupheavalstatus'> videoupheavalstatus = #XGTJvideoupheavalstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideocodeerrorstatus'> videocodeerrorstatus = #XGTJvideocodeerrorstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideonoisestatus'> videonoisestatus = #XGTJvideonoisestatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideorollstripestatus'> videorollstripestatus = #XGTJvideorollstripestatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideostatus'> videostatus = #XGTJvideostatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideofailurecause'> videofailurecause = #XGTJvideofailurecause# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvqdtaskid'> vqdtaskid = #XGTJvqdtaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJrecordstate'> recordstate = #XGTJrecordstate# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJrecordfailuretype'> recordfailuretype = #XGTJrecordfailuretype# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJrecordfailurecause'> recordfailurecause = #XGTJrecordfailurecause# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJrecordtaskid'> recordtaskid = #XGTJrecordtaskid# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideolabelstatus'> videolabelstatus = #XGTJvideolabelstatus# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideolabeltime'> videolabeltime = #XGTJvideolabeltime# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJvideolabelaccount'> videolabelaccount = #XGTJvideolabelaccount# </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_Ywvideohistorystate" parameterClass="java.util.Map">
		delete from ywvideohistorystate 
		<include refid="condition_Ywvideohistorystate"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ywvideohistorystate" parameterClass="java.util.Map">
		delete from ywvideohistorystate 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ywvideohistorystate" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into ywvideohistorystate(
			 <![CDATA[ 
				historystateid,currentstateid,videonum,channelnum,channelname,videocatalog,currentstate,currentstatetime,isonline,playfail,networkerror,vqcstate,vqcfailuretype,vqcfailurecause,vqctaskid,vqdstate,nosignalstatus,imgclearstatus,imgcontraststatus,imgcolorstatus,imglightstatus,videofreezestatus,videojitterstatus,videoupheavalstatus,videocodeerrorstatus,videonoisestatus,videorollstripestatus,videostatus,videofailurecause,vqdtaskid,recordstate,recordfailuretype,recordfailurecause,recordtaskid,videolabelstatus,videolabeltime,videolabelaccount,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].historystateid#,#list[].currentstateid#,#list[].videonum#,#list[].channelnum#,#list[].channelname#,#list[].videocatalog#,#list[].currentstate#,#list[].currentstatetime#,#list[].isonline#,#list[].playfail#,#list[].networkerror#,#list[].vqcstate#,#list[].vqcfailuretype#,#list[].vqcfailurecause#,#list[].vqctaskid#,#list[].vqdstate#,#list[].nosignalstatus#,#list[].imgclearstatus#,#list[].imgcontraststatus#,#list[].imgcolorstatus#,#list[].imglightstatus#,#list[].videofreezestatus#,#list[].videojitterstatus#,#list[].videoupheavalstatus#,#list[].videocodeerrorstatus#,#list[].videonoisestatus#,#list[].videorollstripestatus#,#list[].videostatus#,#list[].videofailurecause#,#list[].vqdtaskid#,#list[].recordstate#,#list[].recordfailuretype#,#list[].recordfailurecause#,#list[].recordtaskid#,#list[].videolabelstatus#,#list[].videolabeltime#,#list[].videolabelaccount#,#list[].createaccount#,#list[].createtime#,#list[].modifyaccount#,#list[].modifytime#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				)
			]]>    
    	</iterate> 
	</insert>
	
	
	
	
	<!-- query objects by page-->
	<select id="query_Ywvideohistorystate" resultClass="java.util.HashMap" parameterClass="java.util.Map" remapResults="true">
			select a.historystateid,a.videonum,a.channelnum,a.channelname,a.videocatalog,
		      a.currentstate,a.repairstate,a.currentstatetime,a.isonline,a.playfail,a.networkerror,
		      a.vqcstate,a.vqcfailuretype,a.vqcfailurecause,a.vqctaskid,a.videostatus,
		      a.videofailurecause,a.vqdstate,a.nosignalstatus,a.imgclearstatus,a.imgcontraststatus,
		      a.imgoverbrightstatus,a.imgtoodarkstatus,a.imgcolorstatus,a.videonoisestatus,
		      a.videorollstripestatus,a.blackwhiteimgstatus,a.videofreezestatus,a.videojitterstatus,
		      a.videoupheavalstatus,a.scenechangestatus,a.videoocclusionstatus,a.videocodeerrorstatus,
		      a.vqdfailuretype,a.vqdfailurecause,a.vqdtaskid,a.recordstate,a.recordfailuretype,
		      a.recordfailurecause,a.recordtaskid,a.videolabelstatus,a.videolabeltime,a.videolabelaccount,
		      a.isonlineupstate,a.isonlineuptime,a.isonlineupdatetime,a.vqdupstate,a.vqduptime,
		      a.vqdupdatetime,a.createaccount,a.createtime,a.modifyaccount,a.modifytime,a.remarks,
		      a.extend1,a.extend2,a.extend3,a.extend4,
		      d.ADMINCATALOGUE as xzbh,e.sbip,e.cjmc
		      from ywvideohistorystate a
			left join sbxx e on a.videonum=e.sbbh
			<isNotEmpty prepend=' ' property='bmbh'>
				LEFT JOIN sbtdjqqx b on (b.sbbh=a.videonum and b.tdbh=a.channelnum )
			</isNotEmpty>
			INNER JOIN ywvideosyncchannel d on (d.videonum=a.videonum and d.channelnum=a.channelnum )
			where 1=1 
			<isNotEmpty prepend='and' property='xzbh'>
				(d.ADMINCATALOGUE = #xzbh# )
			</isNotEmpty>
			<isNotEmpty prepend='and' property='bmbh'>
				 b.bmbh = #bmbh#
			</isNotEmpty>	
			<isNotEmpty prepend='AND' property='historystateid'>
				(a.historystateid = #historystateid# )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='isonline'>
				(a.isonline = #isonline# )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='vqdstate'>
				(a.vqdstate = #vqdstate# )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='recordstate'>
				(a.recordstate = #recordstate# )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='videonum'>
				(a.videonum = #videonum# )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='channelnum'>
				(a.channelnum = #channelnum# )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='LIKEchannelname'>
				(a.channelname like '%$LIKEchannelname$%'  )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='LIKEvideonum'>
				(a.videonum like '%$LIKEvideonum$%'  )
			</isNotEmpty>
			<isNotEmpty prepend='AND' property='currentstate'>
				(a.currentstate = #currentstate#  )
			</isNotEmpty>
			<isNotEmpty property='tableparam'>
				$tableparam$
			</isNotEmpty>
			<isNotEmpty prepend=' ' property='order'>
				 $order$
			</isNotEmpty>	
	</select>
	<select id="count_Ywvideohistorystate" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ywvideohistorystate a
		<isNotEmpty prepend=' ' property='bmbh'>
			LEFT JOIN sbtdjqqx b on (b.sbbh=a.videonum and b.tdbh=a.channelnum )
		</isNotEmpty>
		<isNotEmpty prepend=' ' property='xzbh'>
			INNER JOIN ywvideosyncchannel d on (a.videonum=d.videonum and a.channelnum=d.channelnum  )
		</isNotEmpty>
			where 1=1 
		<isNotEmpty prepend='and' property='xzbh'>
			(d.ADMINCATALOGUE = #xzbh# )
		</isNotEmpty>
		<isNotEmpty prepend='and' property='bmbh'>
			 b.bmbh = #bmbh#
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='historystateid'>
			(a.historystateid = #historystateid# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='isonline'>
			(a.isonline = #isonline# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='vqdstate'>
			(a.vqdstate = #vqdstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='recordstate'>
			(a.recordstate = #recordstate# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='videonum'>
			(a.videonum = #videonum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='channelnum'>
			(a.channelnum = #channelnum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEchannelname'>
			(a.channelname like '%$LIKEchannelname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEvideonum'>
			(a.videonum like '%$LIKEvideonum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='currentstate'>
			(a.currentstate = #currentstate#  )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>	
	</select>
</sqlMap>











