参考的是参数联动的语句以及下拉框为空时选择全部,请教各位我哪里理解不对,应该怎样改 ds1 的语句为 :SELECT * FROM 订单 where 1=1 ${if(len(area) == 0,"","and 货主地区 in ('" + area + "')")} ${if(len(province) == 0,"","and 货主省份 in ('" + province+ "')")} 动态sql 1的语句为 SELECT * FROM 订单 where 1=1 ${if(len(area) == 0,"","and 货主地区 in ('" + area + "')")} ${if(len(province) == 0,"","and 货主省份 in ('" + province+ "')")} and 货主地区in('${area}') 动态sql 2的 SELECT * FROM 订单 where 1=1 ${if(len(area) == 0,"","and 货主地区 in ('" + area + "')")} ${if(len(province) == 0,"","and 货主省份 in ('" + province+ "')")} and 货主地区in('${area}') and 货主省份in('${province}') |