public abstract class SupportJoinWrapper<T,R,Children extends SupportJoinWrapper<T,R,Children>> extends com.baomidou.mybatisplus.core.conditions.AbstractWrapper<T,R,Children> implements IfCompareFun<Children,R>
LambdaQueryWrapper,
序列化表格| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<R,String> |
customAliasMap
自定义别名map
|
protected List<FieldMapping> |
fieldMappingList
查询的字段映射列表
|
private IFuncKeyWord |
funcKeyWord
关键字获取
|
protected boolean |
hasDistinct
是否添加去重关键字
|
protected List<com.baomidou.mybatisplus.core.conditions.SharedString> |
joinSql
关联表SQL
|
protected List<ManyToManySelectBuild> |
manyToManySelectBuildList
多对多 构建列表
|
protected boolean |
masterLogicDelete |
protected String |
masterTableAlias
主表别名
|
protected boolean |
notDefaultSelectAll
是否查询主表全部字段 该条件是在没有指定查询字段的时候生效
|
protected List<OneToOneSelectBuild> |
oneToOneSelectBuildList
一对一 构建列表
|
protected List<com.baomidou.mybatisplus.core.conditions.SharedString> |
sqlSelect
查询字段
|
| 构造器和说明 |
|---|
SupportJoinWrapper() |
| 限定符和类型 | 方法和说明 |
|---|---|
Children |
addObjConditions(Object obj) |
Children |
addObjConditions(Object obj,
Class<?> groupClass)
添加实体构建基础条件
|
Children |
distinct()
添加去重函数
|
<R> R |
executeQuery(com.baomidou.mybatisplus.core.toolkit.support.SFunction<JoinBaseMapper<T>,R> function) |
private void |
expressionAdd(com.baomidou.mybatisplus.core.conditions.segments.AbstractISegmentList list,
com.baomidou.mybatisplus.core.enums.SqlKeyword sqlKeyword) |
protected String |
getAliasAndField(String alias,
String fieldName)
获取 增加别名后的字段
|
private ConditionAnnoVal |
getConditionAnnoVal(Field field) |
abstract R |
getConditionR(Class<?> entityClass,
Field field)
只为避开类型检查
|
protected Class<?> |
getEntityOrMasterClass()
获取实体并关联的
|
IFuncKeyWord |
getFuncKeyWord() |
String |
getJoinSql()
获取join SQL语句
|
protected Class<?> |
getTableClass(Class<?> clz)
获取表对应的class 主要用于 vo dto这种对应实体
|
protected com.baomidou.mybatisplus.core.metadata.TableFieldInfo |
getTableFieldInfoByFieldName(String fieldName) |
protected com.baomidou.mybatisplus.core.metadata.TableFieldInfo |
getTableFieldInfoByFieldName(String fieldName,
Class<?> clz) |
protected void |
initNeed() |
Children |
masterLogicDelete(boolean masterLogicDelete)
设置主表逻辑删除
|
private int |
processAbstractWrapper(String alias,
com.baomidou.mybatisplus.core.conditions.AbstractWrapper wrapper,
String id)
处理AbstractWrapper类型的片段
|
private void |
processGroupBySegments(String alias,
com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments)
处理分组SQL片段
|
private void |
processHavingSegments(com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments,
String id)
处理Having条件片段
|
private int |
processNormalSegments(String alias,
com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments,
String id)
处理普通SQL片段
|
private void |
processOrderBySegments(String alias,
com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments)
处理排序SQL片段
|
protected int |
readWrapperInfo(String alias,
com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments,
String id,
boolean isAdd)
读取和处理Wrapper信息
|
protected void |
setFieldMappingList(String fieldName,
String columns) |
Children |
setFuncKeyWord(IFuncKeyWord funcKeyWord) |
addCondition, addNestedCondition, allEq, allEq, and, and, appendSqlSegments, apply, between, clear, clone, columnSqlInjectFilter, columnsToString, columnsToString, columnToSqlSegment, columnToString, comment, eq, exists, first, formatParam, formatSqlMaybeWithParam, func, ge, geSql, getEntity, getEntityClass, getExpression, getParamAlias, getParamNameValuePairs, getSqlComment, getSqlFirst, getSqlSegment, groupBy, groupBy, groupBy, gt, gtSql, having, in, in, inExpression, inExpression, inSql, instance, 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, setEntity, setEntityClass, setParamAliasgetCustomSqlSegment, getSqlSelect, getSqlSet, getTargetSql, isEmptyOfEntity, isEmptyOfNormal, isEmptyOfWhere, nonEmptyOfEntity, nonEmptyOfNormal, nonEmptyOfWhereequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbetweenIfNull, 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, orfunc, geSql, groupBy, groupBy, groupBy, gtSql, having, in, in, inSql, isNotNull, isNull, leSql, ltSql, notIn, notIn, notInSql, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDescprotected List<OneToOneSelectBuild> oneToOneSelectBuildList
protected List<ManyToManySelectBuild> manyToManySelectBuildList
protected List<FieldMapping> fieldMappingList
protected List<com.baomidou.mybatisplus.core.conditions.SharedString> sqlSelect
protected List<com.baomidou.mybatisplus.core.conditions.SharedString> joinSql
protected boolean masterLogicDelete
protected String masterTableAlias
protected boolean notDefaultSelectAll
protected boolean hasDistinct
@Autowired(required=false) private IFuncKeyWord funcKeyWord
public Children setFuncKeyWord(IFuncKeyWord funcKeyWord)
public IFuncKeyWord getFuncKeyWord()
public Children masterLogicDelete(boolean masterLogicDelete)
masterLogicDelete - 是否设置逻辑删除,如果为false则主表不加入逻辑删除public Children distinct()
public String getJoinSql()
protected int readWrapperInfo(String alias, com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments, String id, boolean isAdd)
private int processNormalSegments(String alias, com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments, String id)
private int processAbstractWrapper(String alias, com.baomidou.mybatisplus.core.conditions.AbstractWrapper wrapper, String id)
private void processGroupBySegments(String alias, com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments)
private void processHavingSegments(com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments,
String id)
private void processOrderBySegments(String alias, com.baomidou.mybatisplus.core.conditions.segments.MergeSegments mergeSegments)
private void expressionAdd(com.baomidou.mybatisplus.core.conditions.segments.AbstractISegmentList list,
com.baomidou.mybatisplus.core.enums.SqlKeyword sqlKeyword)
protected String getAliasAndField(String alias, String fieldName)
fieldName - 字段protected Class<?> getTableClass(Class<?> clz)
clz - 类protected Class<?> getEntityOrMasterClass()
public Children addObjConditions(Object obj, Class<?> groupClass)
entity - 实体对象private ConditionAnnoVal getConditionAnnoVal(Field field)
public <R> R executeQuery(com.baomidou.mybatisplus.core.toolkit.support.SFunction<JoinBaseMapper<T>,R> function)
protected void initNeed()
protected com.baomidou.mybatisplus.core.metadata.TableFieldInfo getTableFieldInfoByFieldName(String fieldName, Class<?> clz)
protected com.baomidou.mybatisplus.core.metadata.TableFieldInfo getTableFieldInfoByFieldName(String fieldName)
Copyright © 2025. All rights reserved.