- 字符串等于
<if test='type=="y"'>and status = 0 </if>
//注意是双引号,不是单引号!!!
- foreach
<if test="status != null and status.size() > 0">
and n.deleteStatus in
<foreach collection="status" item="s" index="index" open="(" separator="," close=")">
#{s,jdbcType=INTEGER}
</foreach>
</if>
<if test="vols != null and vols != '' ">
and g.vol in
<foreach item="item" index="index" collection="vols.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
- CDATA
and <![CDATA[g.offer_time <= #{offerTimeE,jdbcType=TIMESTAMP}]]>