当前位置:Gxlcms > 数据库问题 > Mybatis—动态sql拼接问题

Mybatis—动态sql拼接问题

时间:2021-07-01 10:21:17 帮助过:49人阅读

2、数字类型

2.1 仅作null判断

例如:<if test=‘id != null‘>

2.2 数字的大小于判断

例如:<if test=‘id != null and id > 27 ‘> 

或者 <if test=‘id != null and id gt 27 ‘>

3、集合类型

3.1 判断list是否为空

例如:例如:<if test="userList != null and userList.isEmpty()"></if> 

或者<if test="userList != null and userList.size()>0"></if>

 

 

Mybatis—动态sql拼接问题

标签:lte   -name   方法   ati   empty   开头   list   if判断   1.3   

人气教程排行