MyBatis-plus 动态条件构造器总结

MyBatis-plus 动态条件构造器类结构图:

MyBatis Plus条件构造器QueryWrapper对应常用SQL语法说明:

函数 说明 SQL语法
eq 等于 =
ne 不等于 <>
gt 大于  >
lt 小于 <
ge 大于等于 >=
le 小于等于  <=
or  或者 or
and  并且 and
like 模糊查询包含s like %s%
likeLeft 左匹配模糊查询 like %s
likeRight  右匹配模糊查询 like s%
between 在v1到v2之间 between v1 and v2
notBetween 不在v1到v2之间 not between v1 and v2
isNull 是否为空  is null
isNotNull 是否不为空 is not null
in  field在[a, b, c]之中 field in (a, b, c)
notIn field不在在[a, b, c]之中  field not in (a, b, c)
orderByAsc  升序排序 order by field asc
orderByDesc  降序排序 order by field desc
groupBy 分组 group by
having 分组过滤  having

猜你喜欢

转载自blog.csdn.net/zhouzhiwengang/article/details/114677397