日期:2014-05-20 浏览次数:20905 次
<select id="getLetters" parameterClass="java.util.HashMap" resultMap="Letter"> SELECT * FROM zzb_introletter WHERE introDate>=#introDate# <isNotEmpty prepend="AND" property="toDate"> <![CDATA[ introDate<=#toDate# ]]> </isNotEmpty> <isNotEmpty prepend="AND" property="introDir"> introDir = #introDir# </isNotEmpty> <isNotEmpty prepend="AND" property="introSrc"> introSrc = #introSrc# </isNotEmpty> <isNotEmpty prepend="AND" property="introDes"> introDes = #introDes# </isNotEmpty> <isNotEmpty prepend="AND" property="memberName"> memberName = #memberName# </isNotEmpty> <isNotNull prepend=" " property="orderKey"> <isNotEqual prepend=" " property="orderKey" compareValue="UNDEFINED"> ORDER BY $orderKey$ $orderValue$ </isNotEqual> </isNotNull> <isNotEmpty prepend=" " property="limit"> limit #limit# offset #start# </isNotEmpty> </select> <select id="getCount" parameterClass="java.util.HashMap" resultClass="int"> SELECT COUNT(*) FROM zzb_introletter WHERE introDate>=#introDate# <isNotEmpty prepend="AND" property="toDate"> <![CDATA[ introDate<=#toDate# ]]> </isNotEmpty> <isNotEmpty prepend="AND" property="introDir"> introDir = #introDir# </isNotEmpty> <isNotEmpty prepend="AND" property="introSrc"> introSrc = #introSrc# </isNotEmpty> <isNotEmpty prepend="AND" property="introDes"> introDes = #introDes# </isNotEmpty> <isNotEmpty prepend="AND" property="memberName"> memberName = #memberName# </isNotEmpty> </select>
<isNotNull prepend=" " property="orderKey"> <isNotEqual prepend=" " property="orderKey" compareValue="UNDEFINED"> ORDER BY $orderKey$ $orderValue$ </isNotEqual> </isNotNull> <isNotEmpty prepend=" " property="limit"> limit #limit# offset #start# </isNotEmpty>