标签:indexof cat abstract 允许 tor lse ref 调用 字段名
allEq(Map<R, V> params)
allEq(Map<R, V> params, boolean null2IsNull)
allEq(boolean condition, Map<R, V> params, boolean null2IsNull)
个别参数说明:
params : key为数据库字段名,value为字段值
null2IsNull : 为true则在map的value为null时调用 isNull 方法,为false时则忽略value为null的
例1: allEq({id:1,name:"老王",age:null})
--->id = 1 and name = ‘老王‘ and age is null
例2: allEq({id:1,name:"老王",age:null}, false)
--->id = 1 and name = ‘老王‘
allEq(BiPredicate<R, V> filter, Map<R, V> params)
allEq(BiPredicate<R, V> filter, Map<R, V> params, boolean null2IsNull)
allEq(boolean condition, BiPredicate<R, V> filter, Map<R, V> params, boolean null2IsNull)
个别参数说明:
filter : 过滤函数,是否允许字段传入比对条件中
params 与 null2IsNull : 同上
例1: allEq((k,v) -> k.indexOf("a") >= 0, {id:1,name:"老王",age:null})
--->name = ‘老王‘ and age is null
例2: allEq((k,v) -> k.indexOf("a") >= 0, {id:1,name:"老王",age:null}, false)
--->name = ‘老王‘
eq(R column, Object val)
eq(boolean condition, R column, Object val)
等于 =
例: eq("name", "老王")
--->name = ‘老王‘
ne(R column, Object val)
ne(boolean condition, R column, Object val)
不等于 <>
例: ne("name", "老王")
--->name <> ‘老王‘
gt(R column, Object val)
gt(boolean condition, R column, Object val)
大于 >
例: gt("age", 18)
--->age > 18
ge(R column, Object val)
ge(boolean condition, R column, Object val)
大于等于 >=
例: ge("age", 18)
--->age >= 18
https://mybatis.plus/guide/wrapper.html#abstractwrapper
标签:indexof cat abstract 允许 tor lse ref 调用 字段名
原文地址:https://www.cnblogs.com/deepminer/p/12589532.html