Browse Source

Changed Basic Stuff

Fruit of Eden 7 years ago
parent
commit
3b208c562b
1 changed files with 14 additions and 17 deletions
  1. 14 17
      src/main/java/org/geek/szbay/assistant/code/CodeHelpper.java

+ 14 - 17
src/main/java/org/geek/szbay/assistant/code/CodeHelpper.java

@@ -29,17 +29,11 @@ import org.geek.szbay.assistant.utils.StringUtils;
  * @version 1.0
  */
 public class CodeHelpper {
-    private static final String DB_URL ="jdbc:mysql://127.0.0.1/air_db?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull";  
-    private static final String DB_NAME = "root";  
-    private static final String DB_PASS = "admin";  
+    private static final String DB_URL ="jdbc:mysql://south.niimei.com:3306/factory8?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull";
+    private static final String DB_NAME = "factory8";
+    private static final String DB_PASS = "m9IusZO22umtSfiD";
     private static final String DB_DRIVER ="com.mysql.jdbc.Driver";
-    private static final String DB_SCHEMA = "air_db";
-
-//	private static final String DB_URL ="jdbc:mysql://121.43.149.208:3308/air_db?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull";
-//    private static final String DB_NAME = "dhair";  
-//    private static final String DB_PASS = "pWt$9Ew4+ekJe84";  
-//    private static final String DB_DRIVER ="com.mysql.jdbc.Driver";
-//    private static final String DB_SCHEMA = "air_db";
+    private static final String DB_SCHEMA = "factory8";
 
     /** 作者名字 */
     private String authorName = "wutianbin";
@@ -52,19 +46,19 @@ public class CodeHelpper {
     //private String preTableName = "ao\\_com";
     
     /** 指定实体生成所在包的路径 */
-    private String entityOutPath = "com.donghaiair.flyprepare.admin.domain";
+    private String entityOutPath = "smart.dubby.domain";
 
     /** 指定Dao生成所在包的路径 */
-    private String daoOutPath = "com.donghaiair.flyprepare.admin.dao";
+    private String daoOutPath = "smart.dubby.dao";
 
     /** 指定Service生成所在包的路径 */
-    private String serviceOutPath = "com.donghaiair.flyprepare.admin.service";
+    private String serviceOutPath = "smart.dubby.service";
 
     /** 指定controller生成所在包的路径 */
-    private String controllerOutPath = "com.donghaiair.flyprepare.admin.controller";
+    private String controllerOutPath = "smart.dubby.controller";
     
     /** dto所在的目录根路径 */
-    private String dtoRootPath = "com.donghaiair.flyprepare.admin.dto";
+    private String dtoRootPath = "smart.dubby.dto";
 
     /** 指定Mapper生成所在包的路径 */
     private String mapperOutPath = "mappers";
@@ -94,7 +88,10 @@ public class CodeHelpper {
         
         for(String tableName : tableList.keySet()) {
         	String tableComment = tableList.get(tableName);
-        	
+        	if(!tableName.startsWith("fc")){
+        	    continue;
+            }
+
             key = getTableColumns(con, tableName, attrNames, colNames, colTypes, colComments);
             if (key == null || key.trim().isEmpty()) {
             	System.out.println(tableName + " not key!!!!!!!!!!");
@@ -238,7 +235,7 @@ public class CodeHelpper {
             System.out.println(path);  
             System.out.println("src/?/" + path.substring(path.lastIndexOf("/org/", path.length())));  
             // 固定输出到 d:\temp\generate-code 下
-            String outputPath = "d:/temp/generate-code/" + packageOutPath.replace(".", "/") + "/" + fileName;
+            String outputPath = "/Users/me/generate-code/" + packageOutPath.replace(".", "/") + "/" + fileName;
 //            String outputPath = directory.getAbsolutePath() + "/src/" + packageOutPath.replace(".", "/") + "/" + fileName;
 
             forceMakeDirs(outputPath);