like 模糊查询 mybatis写法

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



%是通配符,注意用双引号 ,#{} 里面是传入的参数。
下班记得打卡
原文地址:https://www.cnblogs.com/onlyzhangmeng/p/15330900.html