地址:https://www.cnblogs.com/xianz666/archive/2004/01/13/14034057.html
https://blog.csdn.net/l1006841574/article/details/99670600
- xml,需要对查询条件做非空判断,最好用这个
<select id="getPageTestList" resultType="xx.xx.xx.ListVo">
select * from test
<if test="ew.emptyOfWhere == false">
${ew.customSqlSegment}
</if>
</select>
2.sql语句有where,用这个
<select id="getPageTestList" resultType="xx.xx.xx.ListVo">
select * from test
where id = 1
and ${ew.customSqlSegment}
</select>