在寫mysql的sql語句時,會用到>=或者<=
那么<=這個會被解析為xml的語法 (org.xml.sax.SAXParseException)
這樣就會報錯。
解決:
< | < |
> | > |
+ "<if test='total_price_b!=null and total_price_e!=null'>" + " and (total_price >= #{total_price_b} and total_price <= #{total_price_e})" + "</if>"