下拉框值为0,字段1可以等于0,1,2
你想表达啥,问题是啥
WHERE 1 = 1
${if(下拉框 == 3,"AND 1 = 3","")}
${if(下拉框 == 0,"AND 1 != 3","")}
where后写case when也行
SELECT * FROM TABLE WHERE 1=1 AND ${IF(下拉=3,"字段1=3",IF(下拉=0,"字段1<>3","1<>1"))}----下拉不为3或0时查不出数据