AND ${if(department="","1=1","a.department='"+department+"'")}
这种条件怎么并列,我想在满足department="",今天日期还必须是2023-06-22
${if(and(department="",today()='2023-06-22'),"1=1","AND a.department='"+department+"'")}
AND ${if(department="","1=1 and 日期字段='2023-06-22'","a.department='"+department+"'")}
试试
AND ${if(department=""&&format(today(),"yyyy-MM-dd")="2023-06-22","1=1","a.department='"+department+"'")}