在写mysql的sql语句时,会用到>=或者<=

那么<=这个会被解析为xml的语法 (org.xml.sax.SAXParseException)

这样就会报错。

解决:

&lt; <
&gt; >

 

 

+ "<if test='total_price_b!=null  and  total_price_e!=null'>"
            + " and (total_price &gt;= #{total_price_b} and total_price &lt;= #{total_price_e})"
            + "</if>"

 

相关文章: