|
|
|
@ -101,8 +101,8 @@ public class GenerateCode {
|
|
|
|
|
|
|
|
|
|
//记录主键
|
|
|
|
|
if (rs.getString("Key").equals("PRI")) {
|
|
|
|
|
jo.put("key", Field);
|
|
|
|
|
jo.put("key_type", GenerateCode.dataTypeMap.get(Type));
|
|
|
|
|
jo.set("key", Field);
|
|
|
|
|
jo.set("key_type", GenerateCode.dataTypeMap.get(Type));
|
|
|
|
|
} else {//否则记录到map中
|
|
|
|
|
dataTypeMap.put(Field, GenerateCode.dataTypeMap.get(Type));
|
|
|
|
|
}
|
|
|
|
@ -110,11 +110,11 @@ public class GenerateCode {
|
|
|
|
|
//关闭连接
|
|
|
|
|
rs.close();
|
|
|
|
|
stmt.close();
|
|
|
|
|
jo.put("fields", dataTypeMap);
|
|
|
|
|
jo.put("fieldsComment", commentMap);
|
|
|
|
|
jo.put("beanNameWithoutT", beanNameWithoutT);
|
|
|
|
|
jo.put("comment", comment);
|
|
|
|
|
jo.put("table", table);
|
|
|
|
|
jo.set("fields", dataTypeMap);
|
|
|
|
|
jo.set("fieldsComment", commentMap);
|
|
|
|
|
jo.set("beanNameWithoutT", beanNameWithoutT);
|
|
|
|
|
jo.set("comment", comment);
|
|
|
|
|
jo.set("table", table);
|
|
|
|
|
return jo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|