${if(len(省份)==0&&len(城市)==0,"","province_zf = '"+省份+"'&&city_zf = '"+城市+"'")}
${if(len(省份)==0&&len(城市)==0,"","and province_zf = '"+省份+"'and city_zf = '"+城市+"'")
你这个条件的意思就是两个条件啊 写两条不就好了。。。 或者&&换成and
后面那个&&换成 and ,这是sql
类似于这种sql,具体根据你数据库类型自己改一下就好了:
select
case when len(省份)=0 and len(城市)=0
then province_zf = '"+省份+"' and city_zf = '"+城市
else ''
end
from tablename;