@TableName:表名注解

@TableId:主键注解
@IdType:主键注解
@TableFieId:字段注解(非主键)
属性
类型
必须指定
默认值
描述
value
String
否
""
数据库字段名
el
映射为原生#{...}逻辑,相当于写在xml
里的#{...}部分
exist
boolean
true
是否为数据库表字段
condition
字段 <code>where</code> 实体查询比较条件,有值设置则按设置的值为准,没有则为默认全局的 <code>%s=#{%s}</code>
update
字段 <code>update set</code> 部分注入, 例如:update="%s+1":表示更新时会set version=version+1(该属性优先级高于 <code>el</code> 属性)
insertStrategy
Enum
N
DEFAULT
举例:NOT_NULL: <code>insert into table_a(<if test="columnProperty != null">column</if>) values (<if test="columnProperty != null">#{columnProperty}</if>)</code>
updateStrategy
举例:IGNORED: <code>update table_a set column=#{columnProperty}</code>
whereStrategy
举例:NOT_EMPTY: <code>where <if test="columnProperty != null and columnProperty!=''">column=#{columnProperty}</if></code>
fill
FieldFill.DEFAULT
字段自动填充策略
select
是否进行 select 查询
keepGlobalFormat
false
是否保持使用全局的 format 进行处理
jdbcType
JdbcType
JdbcType.UNDEFINED
JDBC类型 (该默认值不代表会按照该值生效)
typeHandler
Class<? extends TypeHandler>
UnknownTypeHandler.class
类型处理器 (该默认值不代表会按照该值生效)
numericScale
指定小数点后保留的位数
@FieIdStrategy:字段注解(非主键)
@FieIdFill:字段注解(非主键)
@Version:乐观锁注解、标记@Version在字段上
@EnumValue:通枚举类注解(注解在枚举字段上)
@TableLogic:表字段逻辑处理注解(逻辑删除)
@KeySequence:序列主键策略oracle