mybatis plus条件拼接
条件构造器
案例table
AbstractWrapper
allEq:全部eq(或个别isNull)
eq:等于 =
ne:不等于 <>
gt:大于 >
ge:大于等于 >=
lt:小于 <
le:小于等于 <=
between:BETWEEN 值1 AND 值2
notBetween:NOT BETWEEN 值1 AND 值2
like:LIKE '%值%'
notLike:NOT LIKE '%值%'
likeLeft:LIKE '%值'
likeRight:LIKE '值%'
isNull:字段 IS NULL
isNotNull: 字段 IS NULL
in:字段 IN
notIn:字段 NOT IN
inSql:字段 IN ( sql语句 )
notInSql:字段 NOT IN ( sql语句 )
groupBy:分组:GROUP BY 字段, ...
orderByAsc:排序:ORDER BY 字段, ... ASC
orderByDesc 排序:ORDER BY 字段, ... DESC
orderBy:排序:ORDER BY 字段, ...
having:HAVING ( sql语句 )
or:拼接 OR
and:AND 嵌套
nested:正常嵌套 不带 AND 或者 OR
apply:拼接 sql
last:无视优化规则直接拼接到 sql 的最后
exists:拼接 EXISTS ( sql语句 )
notExists:拼接 NOT EXISTS ( sql语句 )
QueryWrapper(select)
select:设置查询字段
excludeColumns:排除查询字段