IBatis 常用XML

 

<select id="GetInfo">

            <![CDATA[

select * from vi_WaterStation 

            ]]>

            <dynamic prepend="where">

                <isParameterPresent>        

   <isEqual property="state" compareValue="0">

    <![CDATA[

          state=#state#

   ]]>
   < /isEqual>                   
                    <isNotEmpty prepend="and" property="MonitorType" >
                        <![CDATA[
              AOBJID=#AOBJID#
                 
]]>
                    </isNotEmpty>
                    <isNotEmpty prepend="and" property="AOBJTYPE" >
                        <![CDATA[
              AOBJTYPE=#AOBJTYPE#
                 
]]>
                    </isNotEmpty>
                 </isParameterPresent>
            </dynamic>
</select>

你可能感兴趣的:(ibatis)