这里要判断类型为String的参数enterprise不为空,这里不能直接使用enterprise!=‘‘和enterprise!=‘‘
必须使用‘来表示‘
‘就是单引号
"<when test=‘enterprise!=null and enterprise!=''‘>",
"and enterprise = #{enterprise}",
"</when>",
同理,类似的
原符号 替换符号
< <
<= <=
>
= >=
& &
‘ ‘
" "
MyBatis在注解SQL中判断字符串类型不为空的正确使用方法
原文:https://www.cnblogs.com/yeyueweiliang/p/15152504.html