如果是两个select,你就不能这么用,建两个数据集,ds1,ds2,然后再建个关联数据集,条件公式是 a=1, 还有个是b=1。
看你的截图,是多个where条件吧
select * from ps_pj_info wehre 1=1 ${if(a=1,"",if(b=1,"and project_year='2020'",""))}
sql发出来…你截图我们怎么改…提问要有艺术感!
${if(a=1,"select * from ps_pj_info",if(b=1,"where project_year="+2020,""))}