| 接口 | 说明 |
|---|---|
| IEnum<T extends java.io.Serializable> |
自定义枚举接口
|
| 类 | 说明 |
|---|---|
| SqlCondition |
SQL 比较条件常量定义类
|
| 枚举 | 说明 | ||
|---|---|---|---|
| DbType |
MybatisPlus 支持的数据库类型,主要用于分页方言
|
||
| FieldFill |
字段填充策略枚举类
判断注入的 insert 和 update 的 sql 脚本是否在对应情况下忽略掉字段的 if 标签生成
FieldStrategy |
|
字段策略枚举类
如果字段是基本数据类型则最终效果等同于
FieldStrategy.IGNORED |
| IdType |
生成ID类型枚举类
|
| 注释类型 | 说明 |
|---|---|
| EnumValue |
支持普通枚举类字段, 只用在enum类的字段上
当实体类的属性是普通枚举,且是其中一个字段,使用该注解来标注枚举类里的那个属性对应字段
使用方式参考 com.baomidou.mybatisplus.test.h2.H2StudentMapperTest
@TableName("student")
class Student {
private Integer id;
private String name;
private GradeEnum grade;//数据库grade字段类型为int
}
public enum GradeEnum {
PRIMARY(1,"小学"),
SECONDORY("2", "中学"),
HIGH(3, "高中");
@EnumValue
private final int code;
private final String descp;
}
|
| InterceptorIgnore |
内置插件的一些过滤规则
支持注解在 Mapper 上以及 Mapper.Method 上
同时存在则 Mapper.method 比 Mapper 优先级高
支持:
true 和 false , 1 和 0 , on 和 off
各属性返回 true 表示不走插件(在配置了插件的情况下,不填则默认表示 false)
|
| KeySequence |
序列主键策略
oracle
|
| OrderBy |
自动排序,用法与SpringDtaJpa的OrderBy类似
在执行MybatisPlus的方法selectList(),Page()等非手写查询时自动带上.
|
| TableField |
表字段标识
|
| TableId |
表主键标识
|
| TableLogic |
表字段逻辑处理注解(逻辑删除)
|
| TableName |
数据库表相关
|
| Version |
乐观锁注解
支持的字段类型:
long,
Long,
int,
Integer,
java.util.Date,
java.sql.Timestamp,
java.time.LocalDateTime
|