where 1=1 and (tc.name LIKE "%"#{categoryName}"%" or tc2.name LIKE "%"#{categoryName}"%")
%是通配符,注意用双引号 ,#{} 里面是传入的参数。
like 模糊查询 mybatis写法
下班记得打卡
where 1=1 and (tc.name LIKE "%"#{categoryName}"%" or tc2.name LIKE "%"#{categoryName}"%")
%是通配符,注意用双引号 ,#{} 里面是传入的参数。