如何使用多个${},多重选择,需要嵌套${} select * from T_ARTICALINPICK_INTF where 1=1 ${if(len(barcode)> 0,"and longbarcode ='"+barcode+"'", if((len(fxjid)==0) and (len(brandcode)==0), "", if(len(fxjid)==0 , "and substr(longbarcode,1,32)='"+brandcode+"'", if(len(brandcode)==0, "and fxjid='"+fxjid+"'", "and substr(longbarcode,1,32)='"+brandcode+"'"+"and fxjid='"+fxjid+"'" ) ) )+"and to_char(inserttime,"+"'"+"yyyy-mm-dd hh24:mi:ss"+"')"+" between "+"'"+starttime +"'"+" and"+ "'"+endtime+"'" ) } 调不通 |