mybatis按姓名或手机号搜索


1、AND ((USER_NAME LIKE '%'||#{searchKey}||'%') OR (MOBILE_PHONE LIKE '%'||#{searchKey}||'%'))
2、
<if test="phone != null and phone != ''">
and MOBILE_PHONE like '%${phone}%'
</if>
<if test="name != null and name != ''">
and EMPLOYEE_NAME like '%${name}%'
</if>


posted on 2017-11-29 10:02  小甜瓜安东泥  阅读(380)  评论(0编辑  收藏  举报