
mybatis
第一小白
这个作者很懒,什么都没留下…
展开
-
mybatis 大于号等等符号转义
< < 小于号 > > 大于号 & & 和 ' '单引号 " "双引号原创 2020-11-25 18:10:30 · 413 阅读 · 0 评论 -
Mybatis中xml的有关if test 条件不生效?
遇到过Mybatis中xml的有关if test 条件不生效,原来是个小细节直接上例子:mapper.xml里面:<if test="age != null and age != '' and age != '-1'"> and AGE = #{age}</if>这样子写你会发现当 age 传进来的时候为 -1 ,这时候sql还是会加上 and AGE = #{age};那么,修改一下即可<if test="age != null..原创 2020-11-18 16:17:06 · 3256 阅读 · 1 评论