<?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="Dtdljdbean" type="cn.vp.XXX.model.DtdljdBean"/> -->	
	<typeAlias alias="Dtdljd" type="cn.im.map.DtdljdBean"/>
	
	<sql id="condition_Dtdljd">
		where 1=1
		<isNotEmpty prepend='AND' property='LIKExh'>
			(xh like concat('%',#LIKExh# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='xh'>
			(xh = #xh#  )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdx'>
			(dx like concat('%',#LIKEdx# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dx'>
			(dx = #dx# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdy'>
			(dy like concat('%',#LIKEdy# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='dy'>
			(dy = #dy# )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='LIKEdjb'>
			(djb like concat('%',#LIKEdjb# ,'%')   )
		</isNotEmpty>
		<isNotEmpty prepend='AND' property='djb'>
			(djb = #djb# )
		</isNotEmpty>
		<isNotEmpty property='tableparam'>
			$tableparam$
		</isNotEmpty>
		<isNotEmpty property='order'>
			$order$
		</isNotEmpty>
	</sql>
	
	<!-- add object -->
	<insert id="insert_Dtdljd" parameterClass="java.util.Map">
		insert into 
		dtdljd(
		<dynamic prepend=" ">  
			<isNotEmpty prepend=',' property='xh'>xh</isNotEmpty>
			<isNotEmpty prepend=',' property='dx'>dx</isNotEmpty>
			<isNotEmpty prepend=',' property='dy'>dy</isNotEmpty>
			<isNotEmpty prepend=',' property='djb'>djb</isNotEmpty>

		</dynamic>  
	    <![CDATA[ 
	        ) values ( 
	    ]]>  
	     <dynamic prepend=" "> 
			<isNotEmpty prepend=',' property='xh'>#xh#</isNotEmpty>
			<isNotEmpty prepend=',' property='dx'>#dx#</isNotEmpty>
			<isNotEmpty prepend=',' property='dy'>#dy#</isNotEmpty>
			<isNotEmpty prepend=',' property='djb'>#djb#</isNotEmpty>

		 </dynamic>  
	    <![CDATA[ 
	        ) 
	    ]]> 
	</insert>
	
	<!-- edit object  -->
	<update id="update_Dtdljd" parameterClass="java.util.Map">
		update dtdljd 
		<dynamic prepend="set ">   
			
			<isNotEmpty prepend=',' property='dx'>dx=#dx#</isNotEmpty>
			<isNotEmpty prepend=',' property='dy'>dy=#dy#</isNotEmpty>
			<isNotEmpty prepend=',' property='djb'>djb=#djb#</isNotEmpty>

		</dynamic>
		where 1=1 
			<isNotEmpty prepend='AND' property='XGTJxh'> xh = #XGTJxh#</isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdx'> dx = #XGTJdx# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdy'> dy = #XGTJdy# </isNotEmpty>
			<isNotEmpty prepend='AND' property='XGTJdjb'> djb = #XGTJdjb# </isNotEmpty>

	</update>
	
	<!-- delete object -->
	<delete id="delete_Dtdljd" parameterClass="java.util.Map">
		delete from dtdljd 
		<include refid="condition_Dtdljd"/>
	</delete>
	
	<!-- query objects by page-->
	<select id="query_Dtdljd" resultClass="java.util.HashMap" parameterClass="java.util.Map">
		select 
			xh,dx,dy,djb
		from dtdljd 
		<include refid="condition_Dtdljd"/>
		<isNotEmpty prepend=' ' property='start'>
			limit #start# ,#limit#
		</isNotEmpty>
	</select>
	
	<!-- query objects totalcount -->
	<select id="count_Dtdljd" resultClass="java.lang.Integer" parameterClass="java.util.Map">
		select count(*) from dtdljd 
		<include refid="condition_Dtdljd"/>			
	</select>
	
</sqlMap>











