举个例子:
<if test="customName != null and customName != ''"> and t.customName like '%'+#{customName}+'%' or t.customType = #{customName} or t.deptType = #{customName} or t.province = #{customName} or t.city = #{customName} or t.direct = #{customName} or t.principalName = #{customName} </if>传了一个customName 去匹配多个字段 ,前端页面就一个搜索框实现多个字段的查询