Mybatis开发中遇到的坑

2019-06-14  本文已影响0人  明丶夷

if标签 中的 and 问题:

通过 if 控制 动态sql 时,多个条件连接时要注意 and 的写法。必须是 小写的and大写的AND 不识别。
<if test="name1 !=null and name2 != null"> 是正确的;
<if test="name1 !=null AND name2 != null"> 是错误的

上一篇 下一篇

猜你喜欢

热点阅读