當傳入的參數爲一個map時,可以使用
<if test=""> </if><if test="map鍵!=null">
數據庫關鍵字=map值
</if>
當時用的參數爲list時,可以使用
AND bp.id IN <foreach collection="list" item="item" index="index" open="(" separator="," close=")"> #{item,jdbcType=INTEGER} </foreach>
其中,
collection="list"
list是傳進來的參數名,map可以和list並列使用。