设置了参数为空时选择全部,不为空时根据like条件进行匹配,但添加通配符%后就会报错,例如:
where 1=1
${if(len(参数aaa)==0,"","and r.fname_l2 like '"+%参数aaa%+"'")}
百分号位置写错了
${if(len(参数aaa)==0,"","and r.fname_l2 like '%"+参数aaa+"%'")}