sql语句如下:
SELECT * FROM SALES_BASIC where 1=1
${if(${fine_username} = 'admin',"","and 地区='江苏'")}
将fine_username的参数值设置为admin,结果报错,求教如何对参数值进行判断
${if(fine_username= 'admin',"","and 地区='江苏'")}
${if(fine_username = 'admin',"limit 3",
if(fine_username = 'jssale',"and 地区='江苏'",
if(fine_username = 'zjsale',"and 地区='浙江'"," limit 2")))}
${if(len(xiaoshouyuan) == 0,"","and 销售员 in ('" + xiaoshouyuan + "')")}
改成这样
${if(fine_username = 'admin',""," and 地区='江苏'")}
帆软自己有个用户名参数叫 fr_username
${if(fr_username = 'admin',""," and 地区='江苏'")}