From a70333bb96e2d70934df4044f277c26c66de464a Mon Sep 17 00:00:00 2001 From: lihengming <89921218@qq.com> Date: Thu, 29 Jun 2017 17:02:55 +0800 Subject: [PATCH] update > optimize code --- src/test/java/CodeGenerator.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/test/java/CodeGenerator.java b/src/test/java/CodeGenerator.java index c5ffb0b..bf8ef6d 100644 --- a/src/test/java/CodeGenerator.java +++ b/src/test/java/CodeGenerator.java @@ -38,7 +38,6 @@ public class CodeGenerator { genCode("输入表名"); } - public static void genCode(String... tableNames) { for (String tableName : tableNames) { //根据需求生成,不需要的注掉,模板有问题的话可以自己修改。 @@ -48,7 +47,6 @@ public class CodeGenerator { } } - public static void genModelAndMapper(String tableName) { Context context = new Context(ModelType.FLAT); context.setId("Potato"); @@ -155,7 +153,6 @@ public class CodeGenerator { data.put("modelNameLowerCamel", tableNameConvertLowerCamel(tableName)); data.put("basePackage", ProjectConstant.BASE_PACKAGE); - File file = new File(PROJECT_PATH + JAVA_PATH + PACKAGE_PATH_CONTROLLER + modelNameUpperCamel + "Controller.java"); if (!file.getParentFile().exists()) { file.getParentFile().mkdirs(); @@ -178,7 +175,6 @@ public class CodeGenerator { return cfg; } - private static String tableNameConvertLowerCamel(String tableName) { StringBuilder result = new StringBuilder(); if (tableName != null && tableName.length() > 0) { @@ -206,7 +202,6 @@ public class CodeGenerator { } - private static String tableNameConvertMappingPath(String tableName) { return "/" + (tableName.contains("_") ? tableName.replaceAll("_", "/") : tableName); }