两个条件同时选,可以查出。只选一个条件查,查不出。请问如何修改,让同时查,分开查都能出结果
通常情况是在SQL上改
where 1=1 ${if(len(参数1)==0,"","and 字段1 in('"+参数1+"')")} ${if(len(参数2)==0,"","and 字段2 in('"+参数2+"')")}
过滤条件类似这样写,试试 if(len($area)==0,nofilter,$area)
参考https://help.fanruan.com/finereport/doc-view-2395.html