你说的前10天是今天减10的日期吗
oracle对应的日期是文本格式
where 1=1
${if(len(时间)=0,"","and bpa.balancedate>='"+datedelta(时间,-10)+"'")}
${if(len(时间)=0,"","and bpa.balancedate<='"+时间+"'")}
oracle对应的字段是日期格式
where 1=1
${if(len(时间)=0,"","and bpa.balancedate>=to_date('"+datedelta(时间,-10)+"','yyyy-mm-dd')")}
${if(len(时间)=0,"","and bpa.balancedate<to_date('"+时间+"','yyyy-mm-dd')+1")}