这里要判断类型为String的参数enterprise不为空,这里不能直接使用enterprise!=''和enterprise!=''
必须使用'来表示'
'就是单引号

"<when test='enterprise!=null and enterprise!=&apos;&apos;'>",
"and enterprise = #{enterprise}",
"</when>",

同理,类似的

原符号  替换符号 
 <       &lt; 
 <=    &lt;=
 >      &gt; 
 >=    &gt;=
 &      &amp;
 '        &apos;
 "       &quot;