如果参数不为空则另一个参数失效
${if(and(len(pici) == 0,or(len(start)==0,len(end)==0)),"","and 日期 between ('" +start + "') and ('" +end + "')")}
这个pici就是你箭头指的控件名.
${if(and(len(pici) == 0,or(len(start)==0,len(end)==0)),"","and 批次号 in ('" +pici + "')")}
楼主:需求准确来说应该是”二个参数都不为空时,才生效。否则不生效。“对吧?
select * from tabname where 1=1 ${if(len(startdate) > 0 && len(enddate) > 0," and 字段 >= '" + startdate + "' and 字段 <= '"+ enddate +"'" ,"")}
数据集里写个判断啊 ${if(len(参数名1)>'0',"",“and 参数二的一些逻辑”)}