| 程序包 | 说明 |
|---|---|
| com.baomidou.mybatisplus |
mybatis-plus 对 mybatis 功能增强,使之用起来更加顺手。
|
| com.baomidou.mybatisplus.entity |
实体类
|
| com.baomidou.mybatisplus.mapper |
自动处理 CURD 基本 SQL 相关类
|
| com.baomidou.mybatisplus.toolkit |
工具包类
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected static Object |
MybatisDefaultParameterHandler.populateKeys(MetaObjectHandler metaObjectHandler,
TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms,
Object parameterObject)
自定义元对象填充控制器
|
| 构造器和说明 |
|---|
TableFieldInfo(GlobalConfiguration globalConfig,
TableInfo tableInfo,
Field field) |
TableFieldInfo(GlobalConfiguration globalConfig,
TableInfo tableInfo,
String column,
String el,
Field field,
TableField tableField)
存在 TableField 注解构造函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
static TableInfo |
SqlHelper.table(Class<?> clazz)
获取TableInfo
|
| 限定符和类型 | 方法和说明 |
|---|---|
org.apache.ibatis.mapping.MappedStatement |
AutoSqlInjector.addSelectMappedStatement(Class<?> mapperClass,
String id,
org.apache.ibatis.mapping.SqlSource sqlSource,
Class<?> resultType,
TableInfo table) |
String |
LogicSqlInjector.getLogicDeleteSql(TableInfo table)
SQL 更新 set 语句
|
void |
AutoSqlInjector.inject(org.apache.ibatis.session.Configuration configuration,
org.apache.ibatis.builder.MapperBuilderAssistant builderAssistant,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
自定义方法,注入点(子类需重写该方法)
|
protected void |
LogicSqlInjector.injectDeleteByIdSql(boolean batch,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
根据 ID 删除
|
protected void |
AutoSqlInjector.injectDeleteByIdSql(boolean batch,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入删除 SQL 语句
|
protected void |
LogicSqlInjector.injectDeleteByMapSql(Class<?> mapperClass,
TableInfo table)
根据 MAP 删除
|
protected void |
AutoSqlInjector.injectDeleteByMapSql(Class<?> mapperClass,
TableInfo table)
注入 map 条件删除 SQL 语句
|
protected void |
LogicSqlInjector.injectDeleteSql(Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
根据 SQL 删除
|
protected void |
AutoSqlInjector.injectDeleteSql(Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入 entity 条件删除 SQL 语句
|
protected void |
AutoSqlInjector.injectInsertOneSql(boolean selective,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入插入 SQL 语句
|
protected void |
LogicSqlInjector.injectSelectByIdSql(boolean batch,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入查询 SQL 语句
|
protected void |
AutoSqlInjector.injectSelectByIdSql(boolean batch,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入查询 SQL 语句
|
protected void |
AutoSqlInjector.injectSelectByMapSql(Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入 map 查询 SQL 语句
|
protected void |
AutoSqlInjector.injectSelectCountSql(Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入EntityWrapper查询总记录数 SQL 语句
|
protected void |
AutoSqlInjector.injectSelectListSql(SqlMethod sqlMethod,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入EntityWrapper方式查询记录列表 SQL 语句
|
protected void |
AutoSqlInjector.injectSelectMapsSql(SqlMethod sqlMethod,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入EntityWrapper方式查询记录列表 SQL 语句
|
protected void |
AutoSqlInjector.injectSelectObjsSql(SqlMethod sqlMethod,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入EntityWrapper方式查询记录列表 SQL 语句
|
protected void |
AutoSqlInjector.injectSelectOneSql(Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入实体查询一条记录 SQL 语句
|
protected void |
AutoSqlInjector.injectSql(org.apache.ibatis.builder.MapperBuilderAssistant builderAssistant,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入SQL
|
protected void |
LogicSqlInjector.injectUpdateByIdSql(boolean selective,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入更新 SQL 语句
|
protected void |
AutoSqlInjector.injectUpdateByIdSql(boolean selective,
Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入更新 SQL 语句
|
protected void |
AutoSqlInjector.injectUpdateSql(Class<?> mapperClass,
Class<?> modelClass,
TableInfo table)
注入批量更新 SQL 语句
|
protected String |
LogicSqlInjector.sqlLogicSet(TableInfo table)
SQL 更新 set 语句
|
protected String |
PostgreSqlInjector.sqlSelectColumns(TableInfo table,
boolean entityWrapper)
SQL 查询所有表字段
|
protected String |
AutoSqlInjector.sqlSelectColumns(TableInfo table,
boolean entityWrapper)
SQL 查询所有表字段
|
protected String |
AutoSqlInjector.sqlSelectObjsColumns(TableInfo table)
SQL 设置selectObj sqlselect
|
protected String |
AutoSqlInjector.sqlSet(boolean selective,
TableInfo table,
String prefix)
SQL 更新 set 语句
|
protected String |
LogicSqlInjector.sqlWhere(TableInfo table) |
protected String |
AutoSqlInjector.sqlWhere(TableInfo table)
SQL 查询条件
|
protected String |
LogicSqlInjector.sqlWhereByMap(TableInfo table) |
protected String |
AutoSqlInjector.sqlWhereByMap(TableInfo table)
SQL map 查询条件
|
protected String |
LogicSqlInjector.sqlWhereEntityWrapper(TableInfo table) |
protected String |
AutoSqlInjector.sqlWhereEntityWrapper(TableInfo table)
EntityWrapper方式获取select where
|
| 限定符和类型 | 方法和说明 |
|---|---|
static TableInfo |
TableInfoHelper.getTableInfo(Class<?> clazz)
获取实体映射表信息
|
static TableInfo |
TableInfoHelper.initTableInfo(org.apache.ibatis.builder.MapperBuilderAssistant builderAssistant,
Class<?> clazz)
实体类反射获取表信息【初始化】
|
| 限定符和类型 | 方法和说明 |
|---|---|
static List<TableInfo> |
TableInfoHelper.getTableInfos()
获取所有实体映射表信息
|
| 限定符和类型 | 方法和说明 |
|---|---|
static org.apache.ibatis.executor.keygen.KeyGenerator |
TableInfoHelper.genKeyGenerator(TableInfo tableInfo,
org.apache.ibatis.builder.MapperBuilderAssistant builderAssistant,
String baseStatementId,
org.apache.ibatis.scripting.LanguageDriver languageDriver)
自定义 KEY 生成器
|
Copyright © 2017. All rights reserved.