根据定义的参数 datetype 来选择按年查询还是按月查询 以下是SQL where BRAND='AZ' AND PRICEACTUAL>=0 ${if(datetype="month", " and (CONVERT(varchar(6),BILLDATE,112) >= '202001'and (CONVERT(varchar(6),BILLDATE,112)<='202001'","")} ${if(datetype="year", " and (CONVERT(varchar(4),BILLDATE,112) >= '2020'and (CONVERT(varchar(4),BILLDATE,112)<='2020'","")} 是语法错误吗 |