like 模糊查询 mybatis写法

where 1=1 and (tc.name LIKE "%"#{categoryName}"%" or tc2.name LIKE "%"#{categoryName}"%")



%是通配符,注意用双引号 ,#{} 里面是传入的参数。
posted @ 2021-09-24 16:15  了悟  阅读(65)  评论(0)    收藏  举报