如图,判断了长度为0(即为空串的情况),现在想在if里再加上为null的情况,请问怎么加
我一写null,null就自动变为参数键。。
${if(len(userName)=0 || isnull(userName) = 'true',""," and nt.real_name = '"+userName +"'")}
______
and 后面的nt.real_name 改成判断 case when nt.real_name is null then '' else nt.real_name end
${if(len(userName)==0 || userName == 'null',"","and nt.real_name = '"+userName +"'")}
${if(len(year) == 0,"","and year = '" + year + "'")}