Skip to content

Commit

Permalink
fix: entity设置了字段自动填充时生成代码报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfantasy committed Feb 28, 2023
1 parent dddef4f commit 3bd3b6f
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ private void configInjection(InjectionConfig.Builder builder, UserConfig userCon
controllerMethodsVar.put("hasMethod", true);
}
vars.put("controllerMethods", controllerMethodsVar);
if(!StrUtil.isEmpty(generatorConfig.getSchemaName())){
vars.put("schemaName", generatorConfig.getSchemaName()+".");
if (!StrUtil.isEmpty(generatorConfig.getSchemaName())) {
vars.put("schemaName", generatorConfig.getSchemaName() + ".");
}
objectMap.putAll(vars);
});
Expand Down Expand Up @@ -252,9 +252,11 @@ public String propertyNameConvert(@Nonnull TableField field) {
&& !entityStrategy.getTableFills().isEmpty()) {
List<IFill> tableFills = new ArrayList<>();
for (String tableFillStr : entityStrategy.getTableFills()) {
String[] tmp = tableFillStr.split(":");
IFill tableFill = new Column(tmp[0], FieldFill.valueOf(tmp[1]));
tableFills.add(tableFill);
if (!StrUtil.isEmpty(tableFillStr)) {
String[] tmp = tableFillStr.split(":");
IFill tableFill = new Column(tmp[0], FieldFill.valueOf(tmp[1].toUpperCase()));
tableFills.add(tableFill);
}
}
entityBuilder.addTableFills(tableFills);
}
Expand Down

0 comments on commit 3bd3b6f

Please sign in to comment.