ibatis XML简单示例
<select id="queryLotteryByCriteria" resultparameterproperty="appId">
APPID = #appId#
</isNotEmpty>
<isNotEmpty prepend="and" property="userId_head">
USERID like #userId_head# || '%'
</isNotEmpty>
<isNotEmpty prepend="and" property="userId_trail">
USERID like '%' || #userId_trail#
</isNotEmpty>
<isNotEmpty prepend="and" property="sequence_trail">
APPSEQUENCE like '%' || #sequence_trail#
</isNotEmpty>
<isNotNull prepend="and" property="areas">
AREA in
<iterate property="areas" open="(" close=")" conjunction=",">
#areas[]#
</iterate>
</isNotNull>
</dynamic>
order by APPID,APPSEQUENCE
</select>
<select id="getSequenceForUser" resultClass="java.lang.String">
select s_po_lotterydata.nextval from dual
</select>