比如先选地区,突变就 by 地区,然后 选了省份之后就 by 地区+省份,,所以两个参数都要写if(len(canshu)=0,不过滤,过滤) 的条件,要怎么写SQL啊
where 1=1 and if{len(参数1)=0,"","and 字段1="+参数1} and 1=1 and if{len(参数2)=0,"","and 字段2="+参数2}
where 字段1='${参数1}'
and 字段2='${参数2}'