mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 17:48:25 +08:00
refactor: 移除不必要的赋值。
This commit is contained in:
parent
5540095bc3
commit
fa3249c5b9
@ -57,10 +57,7 @@ public class IdInfo extends ColumnInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IdInfo(String column, String property, Class<?> propertyType, Id id) {
|
public IdInfo(Id id) {
|
||||||
this.column = column;
|
|
||||||
this.property = property;
|
|
||||||
this.propertyType = propertyType;
|
|
||||||
this.keyType = id.keyType();
|
this.keyType = id.keyType();
|
||||||
this.value = id.value();
|
this.value = id.value();
|
||||||
this.before = id.before();
|
this.before = id.before();
|
||||||
|
|||||||
@ -280,7 +280,7 @@ public class TableInfoFactory {
|
|||||||
Id id = field.getAnnotation(Id.class);
|
Id id = field.getAnnotation(Id.class);
|
||||||
ColumnInfo columnInfo;
|
ColumnInfo columnInfo;
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
columnInfo = new IdInfo(columnName, field.getName(), fieldType, id);
|
columnInfo = new IdInfo(id);
|
||||||
idInfos.add((IdInfo) columnInfo);
|
idInfos.add((IdInfo) columnInfo);
|
||||||
} else {
|
} else {
|
||||||
columnInfo = new ColumnInfo();
|
columnInfo = new ColumnInfo();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user