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) { 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();

View File

@ -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();