From 3bd3b6f17260796c8c869dc9614b80965dcfeee3 Mon Sep 17 00:00:00 2001 From: wany Date: Tue, 28 Feb 2023 16:10:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20entity=E8=AE=BE=E7=BD=AE=E4=BA=86?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=85=E6=97=B6?= =?UTF-8?q?=E7=94=9F=E6=88=90=E4=BB=A3=E7=A0=81=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatisplus/generatorui/mbp/MbpGenerator.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/github/davidfantasy/mybatisplus/generatorui/mbp/MbpGenerator.java b/src/main/java/com/github/davidfantasy/mybatisplus/generatorui/mbp/MbpGenerator.java index 141a5ec..2e189dd 100644 --- a/src/main/java/com/github/davidfantasy/mybatisplus/generatorui/mbp/MbpGenerator.java +++ b/src/main/java/com/github/davidfantasy/mybatisplus/generatorui/mbp/MbpGenerator.java @@ -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); }); @@ -252,9 +252,11 @@ public String propertyNameConvert(@Nonnull TableField field) { && !entityStrategy.getTableFills().isEmpty()) { List 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); }