比如:${if(len(djsj)=0,"" , "select * from dual where and djsj>=to_date('${KSSJ}','YYYY/MM/DD')")}
-- 需求版:
${if(len(djsj)=0,"","select * from dual where 1=1 and djsj>=to_date('"+KSSJ+"','YYYY/MM/DD')")}
______________________________
优化版:
select * from dual where 1=1
${if(len(djsj)=0,""," and djsj>=to_date('"+KSSJ+"','YYYY/MM/DD')")}
select * from dual where 1 = 1
${if(len(djsj)=0,"" , "and djsj>=to_date('${KSSJ}','YYYY/MM/DD')")}