请教一下各位大佬, 有两个筛选框,筛选A筛选框的时候,筛选框B设置为不可筛选,并且展示数据集1的数据, 筛选B筛选框的时候,筛选框A设置为不可筛选,并且展示数据集2的数据,数据集1和2来源的表不同,但是最终展示的数据字段一致。请问有什么好的办法吗? 想到一个方法 select a,b,c from t1 where1=1 ${if(len(date)=0,""," and date = ('" + date + "') ")} ${if(len(code)<>0,""," and 1 = ('" + 2 + "') ")} union all select a,b,c from t1 where1=1 ${if(len(code)=0,""," and code= ('" + code+ "') ")} ${if(len(date)<>0,""," and 1 = ('" + 2 + "') ")} 但是请教下,if(len(date)<>0时1=2在参数形式下应该怎么写? |