<?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="Ptdlfwz" >
<!-- 	<typeAlias alias="Ptdlfwzbean" type="com.vp.XXX.model.PtdlfwzBean"/> -->
	
	<sql id="condition_Ptdlfwz">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKEzxh'>
			(zxh like concat('%',#LIKEzxh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zxh'>
			(zxh = #zxh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEzmc'>
			(zmc like concat('%',#LIKEzmc# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='zmc'>
			(zmc = #zmc#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcjry'>
			(cjry like concat('%',#LIKEcjry# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='cjry'>
			(cjry = #cjry#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEcjrq'>
			(cjrq like concat('%',#LIKEcjrq# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='cjrq'>
			(cjrq = #cjrq#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExgry'>
			(xgry like concat('%',#LIKExgry# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xgry'>
			(xgry = #xgry#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKExgrq'>
			(xgrq like concat('%',#LIKExgrq# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xgrq'>
			(xgrq = #xgrq#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEbz'>
			(bz like concat('%',#LIKEbz# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='bz'>
			(bz = #bz#  )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Ptdlfwz" parameterClass="java.util.Map">
		insert into 
		Ptdlfwz(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='zxh'>zxh</isNotEmpty>
<isNotEmpty prepend=',' property='zmc'>zmc</isNotEmpty>
<isNotEmpty prepend=',' property='cjry'>cjry</isNotEmpty>
<isNotEmpty prepend=',' property='cjrq'>cjrq</isNotEmpty>
<isNotEmpty prepend=',' property='xgry'>xgry</isNotEmpty>
<isNotEmpty prepend=',' property='xgrq'>xgrq</isNotEmpty>
<isNotEmpty prepend=',' property='bz'>bz</isNotEmpty>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty  prepend=',' property='zxh'>#zxh#</isNotEmpty>
<isNotEmpty prepend=',' property='zmc'>#zmc#</isNotEmpty>
<isNotEmpty prepend=',' property='cjry'>#cjry#</isNotEmpty>
<isNotEmpty prepend=',' property='cjrq'>#cjrq#</isNotEmpty>
<isNotEmpty prepend=',' property='xgry'>#xgry#</isNotEmpty>
<isNotEmpty prepend=',' property='xgrq'>#xgrq#</isNotEmpty>
<isNotEmpty prepend=',' property='bz'>#bz#</isNotEmpty>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_Ptdlfwz" parameterClass="java.util.Map">
		update Ptdlfwz 
		<dynamic prepend="set ">   
			<isNotEmpty prepend=',' property='zmc'>zmc=#zmc#</isNotEmpty>
<isNotEmpty prepend=',' property='cjry'>cjry=#cjry#</isNotEmpty>
<isNotEmpty prepend=',' property='cjrq'>cjrq=#cjrq#</isNotEmpty>
<isNotEmpty prepend=',' property='xgry'>xgry=#xgry#</isNotEmpty>
<isNotEmpty prepend=',' property='xgrq'>xgrq=#xgrq#</isNotEmpty>
<isNotEmpty prepend=',' property='bz'>bz=#bz#</isNotEmpty>

		</dynamic>
			where 1=1 
			<isNotEmpty  prepend='AND' property='XGTJzxh'>
zxh= #XGTJzxh#
 </isNotEmpty>
	</update>
	
	<!-- delete object -->
	<delete id="delete_Ptdlfwz" parameterClass="java.util.Map">
		delete from Ptdlfwz 
		<include refid="condition_Ptdlfwz"/>
	</delete>
	
	<!-- batch delete object -->
	<delete id="batch_delete_Ptdlfwz" parameterClass="java.util.Map">
		delete from Ptdlfwz 
		where 1=1
			<isNotEmpty prepend='AND' property='keyword'>
			key  in (#keyword#)
			</isNotEmpty>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Ptdlfwz" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			zxh,zmc,cjry,cjrq,xgry,xgrq,bz
		from Ptdlfwz 
		<include refid="condition_Ptdlfwz"/>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Ptdlfwz" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from Ptdlfwz 
		<include refid="condition_Ptdlfwz"/>			
	</select>
	
	<!-- batch add objects -->
	<insert id="batch_insert_Ptdlfwz" parameterClass="java.util.List">
	 	<![CDATA[
          INSERT
      	]]>
      	<iterate conjunction=" " > 
			into Ptdlfwz(
			 <![CDATA[ 
				zxh,zmc,cjry,cjrq,xgry,xgrq,bz
			)values
			 ]]>  		 
			 <![CDATA[ 
				(
			#list[].zxh#
				)
			]]>    
    	</iterate> 
	</insert>
</sqlMap>











