/*你一下t1别名表的字段,一下da别名表的字段,你写的表就一张,又没有别名,我只改了你后面参数的语法,如果报错,就是你别名的问题了!!!*/
select *
from test t1
where 1=1
${IF(WEEKDAY(start_c) =0 &&WEEKDAY(end_c) =6, "AND t1.acq_date=DATE_ADD('"+end_c+"',INTERVAL 1 day) " , "AND da.sum_date IS NOT NULL" )}
/*三个条件*/
select *
from test t1
where 1=1
${IF(WEEKDAY(start_c) =0 &&WEEKDAY(end_c) =6&&DATEDIF(end_c,start_c,"D")=6, "AND t1.acq_date=DATE_ADD('"+end_c+"',INTERVAL 1 day) " , "AND da.sum_date IS NOT NULL" )}
da别名又是哪张表呢???