public class JoinLambdaWrapper<T> extends SupportJoinLambdaWrapper<T,JoinLambdaWrapper<T>> implements com.baomidou.mybatisplus.core.conditions.query.Query<JoinLambdaWrapper<T>,T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>>, JoinMethodFunc<T>, JoinQueryFunc<T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>,JoinLambdaWrapper<T>>
| 限定符和类型 | 字段和说明 |
|---|---|
private List<String> |
joinConditionSql
关联表条件SQL
|
private List<com.baomidou.mybatisplus.core.conditions.SharedString> |
joinSqlSelect
关联表的查询子段
|
private Class<T> |
masterClass
主表class
|
private com.baomidou.mybatisplus.core.conditions.SharedString |
sqlCache
SQL缓存
|
private boolean |
sqlCacheFlag
判断SQL是否缓存过
|
private com.baomidou.mybatisplus.core.conditions.SharedString |
sqlSelectCahce
查询字段缓存
|
private boolean |
sqlSelectFlag
查询字段是否缓存过
|
aliasMap, orderByBuildList, sunQueryList, tableIndexcustomAliasMap, fieldMappingList, hasDistinct, joinSql, manyToManySelectBuildList, masterLogicDelete, masterTableAlias, mpjConfig, notDefaultSelectAll, oneToOneSelectBuildList, sqlSelect| 构造器和说明 |
|---|
JoinLambdaWrapper(Class<T> entityClass) |
JoinLambdaWrapper(Class<T> entityClass,
String alias)
不建议直接 new 该实例,使用 Wrappers.lambdaQuery(entity)
|
JoinLambdaWrapper(T entity) |
JoinLambdaWrapper(T entity,
Class<T> entityClass,
List<com.baomidou.mybatisplus.core.conditions.SharedString> sqlSelect,
AtomicInteger paramNameSeq,
Map<String,Object> paramNameValuePairs,
com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments,
Map<Class<?>,String> aliasMap,
com.baomidou.mybatisplus.core.conditions.SharedString lastSql,
com.baomidou.mybatisplus.core.conditions.SharedString sqlComment,
com.baomidou.mybatisplus.core.conditions.SharedString sqlFirst) |
JoinLambdaWrapper(T entity,
Class<T> entityClass,
List<com.baomidou.mybatisplus.core.conditions.SharedString> sqlSelect,
AtomicInteger paramNameSeq,
Map<String,Object> paramNameValuePairs,
com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments,
com.baomidou.mybatisplus.core.conditions.SharedString lastSql,
com.baomidou.mybatisplus.core.conditions.SharedString sqlComment,
com.baomidou.mybatisplus.core.conditions.SharedString sqlFirst,
String masterTableAlias,
boolean notDefaultSelectAll,
boolean hasDistinct,
List<FieldMapping> fieldMappingList,
List<OneToOneSelectBuild> oneToOneSelectBuildList,
List<ManyToManySelectBuild> manyToManySelectBuildList,
List<com.baomidou.mybatisplus.core.conditions.SharedString> joinSql,
List<com.baomidou.mybatisplus.core.conditions.SharedString> joinSqlSelect,
List<String> joinConditionSql,
Map<Class<?>,String> aliasMap,
boolean sqlCacheFlag,
com.baomidou.mybatisplus.core.conditions.SharedString sqlCache,
boolean sqlSelectFlag,
com.baomidou.mybatisplus.core.conditions.SharedString sqlSelectCache)
全参数公共构造函数 - 用于状态复制
|
JoinLambdaWrapper(T entity,
String alias)
不建议直接 new 该实例,使用 Wrappers.lambdaQuery(entity)
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
String |
getCustomSqlSegment() |
String |
getSqlSegment()
条件SQL
|
String |
getSqlSelect() |
List<com.baomidou.mybatisplus.core.conditions.SharedString> |
getSqlSelectList() |
protected void |
initNeed() |
protected JoinLambdaWrapper<T> |
instance()
用于生成嵌套 sql
故 sqlSelect 不向下传递
|
<J> JoinWrapper<J,T> |
join(Class<J> clz,
String alias,
boolean logicDelete)
进行join操作
|
JoinLambdaWrapper<T> |
notDefaultSelectAll()
在没有指定查询主表字段的情况下,不进行查询字段
|
JoinLambdaWrapper<T> |
select(boolean condition,
List<com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>> columns) |
JoinLambdaWrapper<T> |
select(Class<T> entityClass,
java.util.function.Predicate<com.baomidou.mybatisplus.core.metadata.TableFieldInfo> predicate)
过滤查询的字段信息(主键除外!)
|
JoinLambdaWrapper<T> |
select(com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>... columns)
SELECT 部分 SQL 设置
|
(专用程序包) void |
setAliasMap(Map<Class<?>,String> aliasCacheMap) |
protected void |
setFieldMappingList(List<FieldMapping> fieldMappingList) |
(专用程序包) void |
setGroupBy(com.baomidou.mybatisplus.core.conditions.segments.GroupBySegmentList groupBy)
存入分组数据
|
(专用程序包) void |
setHaving(List<HavingBuild> havingBuildList)
存入having数据
|
(专用程序包) void |
setJoinConditionSql(List<com.baomidou.mybatisplus.core.conditions.SharedString> sunQueryList,
List<com.baomidou.mybatisplus.core.conditions.SharedString> joinSql,
String sql,
String key,
Map<String,Object> joinParamNameValuePairs)
存入外联表 join 查询条件
|
(专用程序包) void |
setJoinSelect(List<com.baomidou.mybatisplus.core.conditions.SharedString> select)
存入外联表查询子段
|
(专用程序包) void |
setJoinSql(List<com.baomidou.mybatisplus.core.conditions.SharedString> sql)
存入外联表join SQL
|
(专用程序包) void |
setLastSql(com.baomidou.mybatisplus.core.conditions.SharedString last)
存入最后一位的SQL 只能存在一个
|
(专用程序包) void |
setManyToManySelect(ManyToManySelectBuild manyToManySelect) |
(专用程序包) void |
setOderByBuildList(List<OrderByBuild> orderByBuildList) |
(专用程序包) void |
setOneToOneSelect(OneToOneSelectBuild oneToOneSelect) |
(专用程序包) void |
setOrderBy(com.baomidou.mybatisplus.core.conditions.segments.OrderBySegmentList orderBy)
存入排序
|
(专用程序包) void |
setSunQueryList(List<com.baomidou.mybatisplus.core.conditions.SharedString> sunQueryList) |
JoinStrQueryWrapper<T> |
toStr()
转换为String类型的Join构造器
原模原样复制所有状态
|
addCondition, between, changeQueryWrapper, columnsToString, columnsToString, columnsToString, columnsToString, columnToString, columnToString, columnToStringNoAlias, eq, ge, getAlias, getAlias, getAliasAndField, getAliasAndField, getColumn, getConditionR, getEntityOrMasterClass, getSelectColumn, getTableClass, gt, le, lt, ne, notBetween, orderBy, orderBySql, selectAll, selectAll, selectAs, selectAs, selectAs, selectAs, selectSunQuery, selectSunQuery, setAliasaddObjConditions, addObjConditions, distinct, executeQuery, getAliasAndField, getFuncKeyWord, getJoinSql, getTableFieldInfoByFieldName, getTableFieldInfoByFieldName, masterLogicDelete, readWrapperInfo, setFieldMappingList, setFuncKeyWordaddCondition, addNestedCondition, allEq, allEq, and, and, appendSqlSegments, apply, between, clone, columnsToString, columnToSqlSegment, comment, doGroupBy, doOrderBy, eq, eqSql, exists, first, formatParam, formatSqlMaybeWithParam, func, ge, geSql, getEntity, getEntityClass, getExpression, getParamAlias, getParamNameValuePairs, getSqlComment, getSqlFirst, groupBy, groupBy, groupBy, groupBy, gt, gtSql, having, in, in, inExpression, inExpression, inSql, isNotNull, isNull, isUseAnnotationOrderBy, last, le, leSql, like, likeLeft, likeRight, likeValue, lt, ltSql, maybeDo, ne, nested, not, not, notBetween, notExists, notIn, notIn, notInSql, notLike, notLikeLeft, notLikeRight, or, or, orderBy, orderBy, orderBy, orderBy, setEntity, setEntityClass, setParamAliasgetSqlSet, getTargetSql, isEmptyOfEntity, isEmptyOfNormal, isEmptyOfWhere, isNonEmptyOfEntity, isNonEmptyOfNormal, isNonEmptyOfWhere, nonEmptyOfEntity, nonEmptyOfNormal, nonEmptyOfWhereequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinnerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, pushInnerJoin, pushInnerJoin, pushInnerJoin, pushInnerJoin, pushJoin, pushJoin, pushLeftJoin, pushLeftJoin, pushLeftJoin, pushLeftJoin, pushRightJoin, pushRightJoin, pushRightJoin, pushRightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoinexecuteQuery, getSunWrapper, joinCount, joinGetOne, joinGetOne, joinList, joinList, joinPage, joinPageorderByAsc, orderByAsc, orderByDesc, orderByDesc, orderBySqlbetween, eq, ge, gt, le, lt, ne, notBetweenbetweenIfNull, eqIfNull, geIfNull, gtIfNull, leIfNull, likeIfNull, likeLeftIfNull, likeRightIfNull, ltIfNull, neIfNull, notBetweenIfNull, notLikeIfNull, notLikeLeftIfNull, notLikeRightIfNullallEq, allEq, allEq, allEq, allEq, allEq, between, between, eq, eq, ge, ge, gt, gt, le, le, like, like, likeLeft, likeLeft, likeRight, likeRight, lt, lt, ne, ne, notBetween, notBetween, notLike, notLike, notLikeLeft, notLikeLeft, notLikeRight, notLikeRightapply, comment, exists, first, last, notExists, oreqSql, func, geSql, groupBy, groupBy, groupBy, gtSql, having, in, in, inSql, isNotNull, isNull, leSql, ltSql, notIn, notIn, notInSql, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDescprivate List<com.baomidou.mybatisplus.core.conditions.SharedString> joinSqlSelect
private boolean sqlCacheFlag
private com.baomidou.mybatisplus.core.conditions.SharedString sqlCache
private boolean sqlSelectFlag
private com.baomidou.mybatisplus.core.conditions.SharedString sqlSelectCahce
public JoinLambdaWrapper(T entity, String alias)
public JoinLambdaWrapper(T entity)
public JoinLambdaWrapper(Class<T> entityClass, String alias)
JoinLambdaWrapper(T entity, Class<T> entityClass, List<com.baomidou.mybatisplus.core.conditions.SharedString> sqlSelect, AtomicInteger paramNameSeq, Map<String,Object> paramNameValuePairs, com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments, Map<Class<?>,String> aliasMap, com.baomidou.mybatisplus.core.conditions.SharedString lastSql, com.baomidou.mybatisplus.core.conditions.SharedString sqlComment, com.baomidou.mybatisplus.core.conditions.SharedString sqlFirst)
public JoinLambdaWrapper(T entity, Class<T> entityClass, List<com.baomidou.mybatisplus.core.conditions.SharedString> sqlSelect, AtomicInteger paramNameSeq, Map<String,Object> paramNameValuePairs, com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments, com.baomidou.mybatisplus.core.conditions.SharedString lastSql, com.baomidou.mybatisplus.core.conditions.SharedString sqlComment, com.baomidou.mybatisplus.core.conditions.SharedString sqlFirst, String masterTableAlias, boolean notDefaultSelectAll, boolean hasDistinct, List<FieldMapping> fieldMappingList, List<OneToOneSelectBuild> oneToOneSelectBuildList, List<ManyToManySelectBuild> manyToManySelectBuildList, List<com.baomidou.mybatisplus.core.conditions.SharedString> joinSql, List<com.baomidou.mybatisplus.core.conditions.SharedString> joinSqlSelect, List<String> joinConditionSql, Map<Class<?>,String> aliasMap, boolean sqlCacheFlag, com.baomidou.mybatisplus.core.conditions.SharedString sqlCache, boolean sqlSelectFlag, com.baomidou.mybatisplus.core.conditions.SharedString sqlSelectCache)
@SafeVarargs public final JoinLambdaWrapper<T> select(com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>... columns)
select 在接口中 com.baomidou.mybatisplus.core.conditions.query.Query<JoinLambdaWrapper<T>,T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>>columns - 查询字段public JoinLambdaWrapper<T> select(boolean condition, List<com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>> columns)
select 在接口中 com.baomidou.mybatisplus.core.conditions.query.Query<JoinLambdaWrapper<T>,T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>>public JoinLambdaWrapper<T> select(Class<T> entityClass, java.util.function.Predicate<com.baomidou.mybatisplus.core.metadata.TableFieldInfo> predicate)
例1: 只要 java 字段名以 "test" 开头的 -> select(i -> i.getProperty().startsWith("test"))
例2: 只要 java 字段属性是 CharSequence 类型的 -> select(TableFieldInfoExt::isCharSequence)
例3: 只要 java 字段没有填充策略的 -> select(i -> i.getFieldFill() == FieldFill.DEFAULT)
例4: 要全部字段 -> select(i -> true)
例5: 只要主键字段 -> select(i -> false)
select 在接口中 com.baomidou.mybatisplus.core.conditions.query.Query<JoinLambdaWrapper<T>,T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>>predicate - 过滤方式public List<com.baomidou.mybatisplus.core.conditions.SharedString> getSqlSelectList()
public String getSqlSelect()
getSqlSelect 在接口中 com.baomidou.mybatisplus.core.conditions.query.Query<JoinLambdaWrapper<T>,T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>>getSqlSelect 在类中 com.baomidou.mybatisplus.core.conditions.Wrapper<T>public JoinLambdaWrapper<T> notDefaultSelectAll()
protected JoinLambdaWrapper<T> instance()
故 sqlSelect 不向下传递
instance 在类中 com.baomidou.mybatisplus.core.conditions.AbstractWrapper<T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>,JoinLambdaWrapper<T>>public void clear()
clear 在类中 com.baomidou.mybatisplus.core.conditions.AbstractWrapper<T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>,JoinLambdaWrapper<T>>public String getSqlSegment()
getSqlSegment 在接口中 com.baomidou.mybatisplus.core.conditions.ISqlSegmentgetSqlSegment 在类中 com.baomidou.mybatisplus.core.conditions.AbstractWrapper<T,com.baomidou.mybatisplus.core.toolkit.support.SFunction<T,?>,JoinLambdaWrapper<T>>public <J> JoinWrapper<J,T> join(Class<J> clz, String alias, boolean logicDelete)
JoinMethodFuncjoin 在接口中 JoinMethodFunc<T>J - 泛型clz - 外联表classalias - 别名logicDelete - 是否查询进行逻辑删除void setJoinConditionSql(List<com.baomidou.mybatisplus.core.conditions.SharedString> sunQueryList, List<com.baomidou.mybatisplus.core.conditions.SharedString> joinSql, String sql, String key, Map<String,Object> joinParamNameValuePairs)
void setJoinSql(List<com.baomidou.mybatisplus.core.conditions.SharedString> sql)
sql - SQLvoid setOrderBy(com.baomidou.mybatisplus.core.conditions.segments.OrderBySegmentList orderBy)
orderBy - 排序列表void setGroupBy(com.baomidou.mybatisplus.core.conditions.segments.GroupBySegmentList groupBy)
groupBy - 分组列表void setHaving(List<HavingBuild> havingBuildList)
havingBuildList - having 构建列表void setJoinSelect(List<com.baomidou.mybatisplus.core.conditions.SharedString> select)
select - 查询字段void setLastSql(com.baomidou.mybatisplus.core.conditions.SharedString last)
last - 外联表传入last数据protected void setFieldMappingList(List<FieldMapping> fieldMappingList)
void setOderByBuildList(List<OrderByBuild> orderByBuildList)
void setSunQueryList(List<com.baomidou.mybatisplus.core.conditions.SharedString> sunQueryList)
void setOneToOneSelect(OneToOneSelectBuild oneToOneSelect)
void setManyToManySelect(ManyToManySelectBuild manyToManySelect)
public String getCustomSqlSegment()
getCustomSqlSegment 在类中 com.baomidou.mybatisplus.core.conditions.Wrapper<T>protected void initNeed()
initNeed 在类中 SupportJoinLambdaWrapper<T,JoinLambdaWrapper<T>>public JoinStrQueryWrapper<T> toStr()
Copyright © 2025. All rights reserved.