t1.has_component is null,t7.total_am <> 0,t1.product_type='1' 这3个条件,我要怎么写参数控制条件,我上面的控件选择复选筛选框
你要控制而什么,你的参数不是已经固定了,三个
===========
假设你复选框实际值是1,2,3,对应这三个条件
where 1=1
${if(find('1',复选框控件名)>0," and t1.has_component is null","")}
${if(find('2',复选框控件名)>0," and t7.total_am <> 0","")}
${if(find('3',复选框控件名)>0," and t1.product_type='1'","")}
你的复选框控件控制的是product_type字段吧,其他两个字段的条件是固定的。
把等于改为in多值就行。
t1.has_component is null and t7.total_am <> 0 and t1.product_type in ('${p_product_type}')
${p_product_type} 是参数,对应的控件类型为复选框。
注意把参数的返回值格式改为字符串,','分割。
数据集参数方式实现下拉复选框多选查询