${if(len(zb) == 0,"","and DATE_FORMAT(create_date,'%Y-%m-%d') <=(SELECT max(date) from dim_time where WEEKYTH_CNT='" + zb + "'AND year='" + yy + "'+"')'"")}
已和楼主沟通解决,改为
${if(len(zb) == 0,"","and DATE_FORMAT(create_date,'%Y-%m-%d') <=(SELECT max(date) from dim_time where WEEKYTH_CNT='" + zb + "' AND year='"+yy+"' )")}
即可
${if(len(zb) == 0,"","and DATE_FORMAT(create_date,'%Y-%m-%d') <=(SELECT max(date) from dim_time where WEEKYTH_CNT='" + zb + "' AND year='" + yy + "'")}
这里要有空格,后面部分去掉