From 74bef58ba34a0c7105185610434b585a636c8f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AC=A7=E6=96=87?= Date: Tue, 25 Dec 2018 22:38:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E9=9D=A2=E6=89=80=E6=9C=89=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=83=BD=E4=BC=9A=E5=9C=A8=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ pom.xml | 2 +- .../controller/MainUIController.java | 23 ++++++++++++++++--- src/main/resources/fxml/MainUI.fxml | 2 +- .../resources/fxml/selectTableColumn.fxml | 7 +++--- 5 files changed, 28 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9ec64e75..53a034c6 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,8 @@ Eclipse or IntelliJ IDEA中启动, 找到```com.zzg.mybatis.generator.MainUI``` ### 赞助 本工具纯属个人业余时间开发与维护,如果你觉得软件对你有用,欢迎赞助,金额随意 :) + + - - - Licensed under the Apache 2.0 License diff --git a/pom.xml b/pom.xml index 0758df30..b848c50f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.zzg mybatis-generator-gui - 0.8.7 + 0.8.8-SNAPSHOT UTF-8 diff --git a/src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java b/src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java index 5f81160e..4689d10a 100644 --- a/src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java +++ b/src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java @@ -325,9 +325,10 @@ public void saveGeneratorConfig() { try { GeneratorConfig generatorConfig = getGeneratorConfigFromUI(); generatorConfig.setName(name); + ConfigHelper.deleteGeneratorConfig(name); ConfigHelper.saveGeneratorConfig(generatorConfig); } catch (Exception e) { - AlertUtil.showErrorAlert("删除配置失败"); + AlertUtil.showErrorAlert("保存配置失败"); } } } @@ -368,11 +369,27 @@ public void setGeneratorConfigIntoUI(GeneratorConfig generatorConfig) { generateKeysField.setText(generatorConfig.getGenerateKeys()); modelTargetProject.setText(generatorConfig.getModelPackageTargetFolder()); daoTargetPackage.setText(generatorConfig.getDaoPackage()); - daoTargetProject.setText(generatorConfig.getDaoTargetFolder()); - mapperTargetPackage.setText(generatorConfig.getMappingXMLPackage()); + daoTargetProject.setText(generatorConfig.getMapperName()); + mapperName.setText(generatorConfig.getMapperName()); + mapperTargetPackage.setText(generatorConfig.getMappingXMLPackage()); mappingTargetProject.setText(generatorConfig.getMappingXMLTargetFolder()); + tableNameField.setText(generatorConfig.getTableName()); + domainObjectNameField.setText(generatorConfig.getDomainObjectName()); + offsetLimitCheckBox.setSelected(generatorConfig.isOffsetLimit()); + commentCheckBox.setSelected(generatorConfig.isComment()); + overrideXML.setSelected(generatorConfig.isOverrideXML()); + needToStringHashcodeEquals.setSelected(generatorConfig.isNeedToStringHashcodeEquals()); + useTableNameAliasCheckbox.setSelected(generatorConfig.getUseTableNameAlias()); + forUpdateCheckBox.setSelected(generatorConfig.isNeedForUpdate()); + annotationDAOCheckBox.setSelected(generatorConfig.isAnnotationDAO()); + annotationCheckBox.setSelected(generatorConfig.isAnnotation()); + useActualColumnNamesCheckbox.setSelected(generatorConfig.isUseActualColumnNames()); encodingChoice.setValue(generatorConfig.getEncoding()); useExample.setSelected(generatorConfig.isUseExample()); + useDAOExtendStyle.setSelected(generatorConfig.isUseDAOExtendStyle()); + useSchemaPrefix.setSelected(generatorConfig.isUseSchemaPrefix()); + jsr310Support.setSelected(generatorConfig.isJsr310Support()); + } @FXML diff --git a/src/main/resources/fxml/MainUI.fxml b/src/main/resources/fxml/MainUI.fxml index 4de33f73..a444f11b 100644 --- a/src/main/resources/fxml/MainUI.fxml +++ b/src/main/resources/fxml/MainUI.fxml @@ -222,7 +222,7 @@ - + diff --git a/src/main/resources/fxml/selectTableColumn.fxml b/src/main/resources/fxml/selectTableColumn.fxml index 18cf955f..97ce33e9 100644 --- a/src/main/resources/fxml/selectTableColumn.fxml +++ b/src/main/resources/fxml/selectTableColumn.fxml @@ -1,8 +1,9 @@ + - + @@ -20,7 +21,7 @@