SELECT DATE_FORMAT(字段,'%Y-%m')
where DATE_FORMAT(字段,'%Y-%m')='${控件名}'
修改后
where 1=1
${if(isnull(控件名),"","DATE_FORMAT(字段,'%Y-%m')='"+控件名+"'")}
${if(isnull(控件名1),"","字段='"+控件名1+"'")}
修改后
select XXX字段 from 表名 where 1=1
${if(isnull(sj),"","and DATE_FORMAT(cjrq,'%Y-%m')='"+sj+"'")}
${if(isnull(jg),"","and jt_mc='"+jg+"'")}