oracle mybatis 模糊查询

加油

<if test="merchantName != null and merchantName != ''">
    AND t1.task_name like concat(concat('%',#{merchantName}),'%')
</if>
<if test="merchantName != null and merchantName != ''">
    AND REGEXP_LIKE(t1.task_name, #{merchantName},'i')
</if>
<if test="taskName != null">
    AND t.task_name like '%${taskName}%'
</if>
concat 函数

正则:
REGEXP_LIKE 会过滤特殊符号
 
posted @ 2018-01-22 11:29  不像程序员  阅读(384)  评论(0编辑  收藏  举报