SELECT * FROM S订单 as 订单where 货主地区 is not null${if(type='date', " and date(订单.订购日期) >= '" + 开始日期 + "' and date(订单.订购日期)<='" + 结束日期 + "'", "")}${if(type='month', " and cast(strftime('%m',订单.订购日期) as int) = "+ 月 + " and strftime('%Y',订单.订购日期) = '" + 年+"'", "")}${if(type='year', " and strftime('%Y',订单.订购日期) = '" + 年+"'", "")}${if(len(是否已付)==0,"","and 是否已付 in ('"+是否已付+"')")}${if(len(treelayer(地区,1))==0,"","and 货主地区='"+treelayer(地区,1)+"'")}${if(len(treelayer(地区,2))==0,"","and 货主省份='"+treelayer(地区,2)+"'")}${if(len(treelayer(地区,3))==0,"","and 货主城市='"+treelayer(地区,3)+"'")} ${if(len(客户)==0,"","and 客户ID in ('"+客户+"')")}求解释 或相关教程