在xml處理sql的程序中,大於號小於號等符號需要進行特殊處理
按照下面的進行替換
< | <= | > | >= |
< | <= | > | >= |
eg:
<select id="getReading" resultMap="BaseResultMap"> select * from files where status=2 and ifc_status=0 <choose> <when test="dealBigFiles == 0"> and size <= #{maxFileSize} </when> <otherwise> and size > #{maxFileSize} </otherwise> </choose> order by id asc limit 1 </select>