MyBatis在注解SQL中判断字符串类型不为空的正确使用方法

时间:2021-08-17 20:59:28   收藏:0   阅读:36

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

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

同理,类似的
原符号 替换符号
< <
<= <=

 &gt; 

= >=
& &
‘ ‘
" "

原文:https://www.cnblogs.com/yeyueweiliang/p/15152504.html

评论(0)
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!