@@ -38,7 +38,6 @@ public static void main(String[] args) {
3838 genCode ("输入表名" );
3939 }
4040
41-
4241 public static void genCode (String ... tableNames ) {
4342 for (String tableName : tableNames ) {
4443 //根据需求生成,不需要的注掉,模板有问题的话可以自己修改。
@@ -48,7 +47,6 @@ public static void genCode(String... tableNames) {
4847 }
4948 }
5049
51-
5250 public static void genModelAndMapper (String tableName ) {
5351 Context context = new Context (ModelType .FLAT );
5452 context .setId ("Potato" );
@@ -155,7 +153,6 @@ public static void genController(String tableName) {
155153 data .put ("modelNameLowerCamel" , tableNameConvertLowerCamel (tableName ));
156154 data .put ("basePackage" , ProjectConstant .BASE_PACKAGE );
157155
158-
159156 File file = new File (PROJECT_PATH + JAVA_PATH + PACKAGE_PATH_CONTROLLER + modelNameUpperCamel + "Controller.java" );
160157 if (!file .getParentFile ().exists ()) {
161158 file .getParentFile ().mkdirs ();
@@ -178,7 +175,6 @@ private static freemarker.template.Configuration getConfiguration() throws IOExc
178175 return cfg ;
179176 }
180177
181-
182178 private static String tableNameConvertLowerCamel (String tableName ) {
183179 StringBuilder result = new StringBuilder ();
184180 if (tableName != null && tableName .length () > 0 ) {
@@ -206,7 +202,6 @@ private static String tableNameConvertUpperCamel(String tableName) {
206202
207203 }
208204
209-
210205 private static String tableNameConvertMappingPath (String tableName ) {
211206 return "/" + (tableName .contains ("_" ) ? tableName .replaceAll ("_" , "/" ) : tableName );
212207 }
0 commit comments