where 1=1 ${if(单选=false,''," and 日期字段 between '"+date1+"'"+"and'"+date2+"'")}
不使用这个单选框你就写 那个参数为空显示全部就好了啊
${if(len(参数名) == 0,"","and 参数 in ('" + 参数名 + "')")}
分开写就好了
where
1=1 ${if(len(开始日期) == 0,"","and rq>='"+开始日期+"'")}
and
1=1 ${if(len(结束日期) == 0,"","and rq<='"+结束日期+"'")}