<?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="Ywarchivecompanybean" type="cn.vp.XXX.model.YwarchivecompanyBean"/> -->	<typeAlias alias="Ywarchivecompany" type="cn.im.companymanage.YwarchivecompanyBean"/>
	
	<sql id="condition_Ywarchivecompany">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEcompanyid'>
			(companyid like '%$LIKEcompanyid$%'   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='companyid'>
			(companyid = #companyid#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcompanynum'>
			(companynum like '%$LIKEcompanynum$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='companynum'>
			(companynum = #companynum# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcompanyname'>
			(companyname like '%$LIKEcompanyname$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='companyname'>
			(companyname = #companyname# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcompanyabbreviation'>
			(companyabbreviation like '%$LIKEcompanyabbreviation$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='companyabbreviation'>
			(companyabbreviation = #companyabbreviation# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcompanytype'>
			(companytype like '%$LIKEcompanytype$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='companytype'>
			(companytype = #companytype# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKElegalpeople'>
			(legalpeople like '%$LIKElegalpeople$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='legalpeople'>
			(legalpeople = #legalpeople# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEestablishtime'>
			(establishtime like '%$LIKEestablishtime$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='establishtime'>
			(establishtime = #establishtime# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcompanycontact'>
			(companycontact like '%$LIKEcompanycontact$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='companycontact'>
			(companycontact = #companycontact# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcontackmobilephone'>
			(contackmobilephone like '%$LIKEcontackmobilephone$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='contackmobilephone'>
			(contackmobilephone = #contackmobilephone# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcontackphone'>
			(contackphone like '%$LIKEcontackphone$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='contackphone'>
			(contackphone = #contackphone# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcontackaddrarea'>
			(contackaddrarea like '%$LIKEcontackaddrarea$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='contackaddrarea'>
			(contackaddrarea = #contackaddrarea# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcontackaddress'>
			(contackaddress like '%$LIKEcontackaddress$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='contackaddress'>
			(contackaddress = #contackaddress# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcompanysynopsis'>
			(companysynopsis like '%$LIKEcompanysynopsis$%'  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='companysynopsis'>
			(companysynopsis = #companysynopsis# )
		</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_Ywarchivecompany" parameterClass="java.util.Map">
		insert into 
		ywarchivecompany(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='companyid'>companyid</isNotEmpty>
			<isNotEmpty prepend=',' property='companynum'>companynum</isNotEmpty>
			<isNotEmpty prepend=',' property='companyname'>companyname</isNotEmpty>
			<isNotEmpty prepend=',' property='companyabbreviation'>companyabbreviation</isNotEmpty>
			<isNotEmpty prepend=',' property='companytype'>companytype</isNotEmpty>
			<isNotEmpty prepend=',' property='legalpeople'>legalpeople</isNotEmpty>
			<isNotEmpty prepend=',' property='establishtime'>establishtime</isNotEmpty>
			<isNotEmpty prepend=',' property='companycontact'>companycontact</isNotEmpty>
			<isNotEmpty prepend=',' property='contackmobilephone'>contackmobilephone</isNotEmpty>
			<isNotEmpty prepend=',' property='contackphone'>contackphone</isNotEmpty>
			<isNotEmpty prepend=',' property='contackaddrarea'>contackaddrarea</isNotEmpty>
			<isNotEmpty prepend=',' property='contackaddress'>contackaddress</isNotEmpty>
			<isNotEmpty prepend=',' property='companysynopsis'>companysynopsis</isNotEmpty>
			<isNotEmpty prepend=',' property='xgry'>createaccount</isNotEmpty>
			<isNotEmpty prepend=',' property='xgrq'>createtime</isNotEmpty>
			<isNotEmpty prepend=',' property='cjry'>modifyaccount</isNotEmpty>
			<isNotEmpty prepend=',' property='cjrq'>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='companyid'>#companyid#</isNotEmpty>
			<isNotEmpty prepend=',' property='companynum'>#companynum#</isNotEmpty>
			<isNotEmpty prepend=',' property='companyname'>#companyname#</isNotEmpty>
			<isNotEmpty prepend=',' property='companyabbreviation'>#companyabbreviation#</isNotEmpty>
			<isNotEmpty prepend=',' property='companytype'>#companytype#</isNotEmpty>
			<isNotEmpty prepend=',' property='legalpeople'>#legalpeople#</isNotEmpty>
			<isNotEmpty prepend=',' property='establishtime'>#establishtime#</isNotEmpty>
			<isNotEmpty prepend=',' property='companycontact'>#companycontact#</isNotEmpty>
			<isNotEmpty prepend=',' property='contackmobilephone'>#contackmobilephone#</isNotEmpty>
			<isNotEmpty prepend=',' property='contackphone'>#contackphone#</isNotEmpty>
			<isNotEmpty prepend=',' property='contackaddrarea'>#contackaddrarea#</isNotEmpty>
			<isNotEmpty prepend=',' property='contackaddress'>#contackaddress#</isNotEmpty>
			<isNotEmpty prepend=',' property='companysynopsis'>#companysynopsis#</isNotEmpty>
			<isNotEmpty prepend=',' property='xgry'>#xgry#</isNotEmpty>
			<isNotEmpty prepend=',' property='xgrq'>#xgrq#</isNotEmpty>
			<isNotEmpty prepend=',' property='cjry'>#cjry#</isNotEmpty>
			<isNotEmpty prepend=',' property='cjrq'>#cjrq#</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_Ywarchivecompany" parameterClass="java.util.Map">
		update ywarchivecompany 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='companynum'>companynum=#companynum#</isNotEmpty>
			<isNotEmpty prepend=',' property='companyname'>companyname=#companyname#</isNotEmpty>
			<isNotEmpty prepend=',' property='companyabbreviation'>companyabbreviation=#companyabbreviation#</isNotEmpty>
			<isNotEmpty prepend=',' property='companytype'>companytype=#companytype#</isNotEmpty>
			<isNotEmpty prepend=',' property='legalpeople'>legalpeople=#legalpeople#</isNotEmpty>
			<isNotEmpty prepend=',' property='establishtime'>establishtime=#establishtime#</isNotEmpty>
			<isNotEmpty prepend=',' property='companycontact'>companycontact=#companycontact#</isNotEmpty>
			<isNotEmpty prepend=',' property='contackmobilephone'>contackmobilephone=#contackmobilephone#</isNotEmpty>
			<isNotEmpty prepend=',' property='contackphone'>contackphone=#contackphone#</isNotEmpty>
			<isNotEmpty prepend=',' property='contackaddrarea'>contackaddrarea=#contackaddrarea#</isNotEmpty>
			<isNotEmpty prepend=',' property='contackaddress'>contackaddress=#contackaddress#</isNotEmpty>
			<isNotEmpty prepend=',' property='companysynopsis'>companysynopsis=#companysynopsis#</isNotEmpty>
			<isNotEmpty prepend=',' property='xgry'>modifyaccount=#xgry#</isNotEmpty>
			<isNotEmpty prepend=',' property='xgrq'>modifytime=#xgrq#</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='XGTJcompanyid'> companyid = #XGTJcompanyid#</isNotEmpty>
	</update>
	
	<!-- delete object -->
	<delete id="delete_Ywarchivecompany" parameterClass="java.util.Map">
		delete from ywarchivecompany 
		<include refid="condition_Ywarchivecompany"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ywarchivecompany" parameterClass="java.util.Map">
		delete from ywarchivecompany 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>

	<!-- query objects by page-->
	<select id="query_Ywarchivecompany" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			companyid,companynum,companyname,companyabbreviation,companytype,legalpeople,establishtime,companycontact,contackmobilephone,contackphone,contackaddrarea,contackaddress,companysynopsis,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
		from ywarchivecompany 
		<include refid="condition_Ywarchivecompany"/>		
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ywarchivecompany" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from ywarchivecompany 
		<include refid="condition_Ywarchivecompany"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ywarchivecompany" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into ywarchivecompany(
			 <![CDATA[ 
				companyid,companynum,companyname,companyabbreviation,companytype,legalpeople,establishtime,companycontact,contackmobilephone,contackphone,contackaddrarea,contackaddress,companysynopsis,createaccount,createtime,modifyaccount,modifytime,remarks,extend1,extend2,extend3,extend4
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
				#list[].companyid#,#list[].companynum#,#list[].companyname#,#list[].companyabbreviation#,#list[].companytype#,#list[].legalpeople#,#list[].establishtime#,#list[].companycontact#,#list[].contackmobilephone#,#list[].contackphone#,#list[].contackaddrarea#,#list[].contackaddress#,#list[].companysynopsis#,#list[].createaccount#,#list[].createtime#,#list[].modifyaccount#,#list[].modifytime#,#list[].remarks#,#list[].extend1#,#list[].extend2#,#list[].extend3#,#list[].extend4#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











