Mybatis if/when中判断字符串
Mybatisif/when中判断字符串
无论在xml或者在@Select等注解中写的if判断的做法,经常只判断空或者''。其实还有一种可以判断字符串或者数值,代码如下:
@Select({"<script>",
"select aab001,aac001 from ab01 where aac001 is not null ",
"<if test='aab001 != null and aab001 = \"1209933\"'>",
" and aab001.
原创
2021-01-29 09:58:27 ·
1758 阅读 ·
2 评论