refactor: 移除不必要的赋值。

This commit is contained in:
Suomm 2023-06-30 19:47:04 +08:00
parent 5540095bc3
commit fa3249c5b9
2 changed files with 2 additions and 5 deletions

View File

@ -57,10 +57,7 @@ public class IdInfo extends ColumnInfo {
}
}
public IdInfo(String column, String property, Class<?> propertyType, Id id) {
this.column = column;
this.property = property;
this.propertyType = propertyType;
public IdInfo(Id id) {
this.keyType = id.keyType();
this.value = id.value();
this.before = id.before();

View File

@ -280,7 +280,7 @@ public class TableInfoFactory {
Id id = field.getAnnotation(Id.class);
ColumnInfo columnInfo;
if (id != null) {
columnInfo = new IdInfo(columnName, field.getName(), fieldType, id);
columnInfo = new IdInfo(id);
idInfos.add((IdInfo) columnInfo);
} else {
columnInfo = new ColumnInfo();