【fix】对方法和局部变量重新命名
This commit is contained in:
+18
-18
@@ -139,7 +139,7 @@ public class DbReadTableUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ColumnVo columnVo = new ColumnVo();
|
ColumnVo columnVo = new ColumnVo();
|
||||||
if (com.jero.codegenerate.properties.CodeConfigProperties.k) {
|
if (com.jero.codegenerate.properties.CodeConfigProperties.dbFiledConvert) {
|
||||||
columnVo.setFieldName(e(resultSet.getString(1).toLowerCase()));
|
columnVo.setFieldName(e(resultSet.getString(1).toLowerCase()));
|
||||||
} else {
|
} else {
|
||||||
columnVo.setFieldName(resultSet.getString(1).toLowerCase());
|
columnVo.setFieldName(resultSet.getString(1).toLowerCase());
|
||||||
@@ -166,7 +166,7 @@ public class DbReadTableUtil {
|
|||||||
|
|
||||||
while(resultSet.previous()) {
|
while(resultSet.previous()) {
|
||||||
ColumnVo columnVo1 = new ColumnVo();
|
ColumnVo columnVo1 = new ColumnVo();
|
||||||
if (com.jero.codegenerate.properties.CodeConfigProperties.k) {
|
if (com.jero.codegenerate.properties.CodeConfigProperties.dbFiledConvert) {
|
||||||
columnVo1.setFieldName(e(resultSet.getString(1).toLowerCase()));
|
columnVo1.setFieldName(e(resultSet.getString(1).toLowerCase()));
|
||||||
} else {
|
} else {
|
||||||
columnVo1.setFieldName(resultSet.getString(1).toLowerCase());
|
columnVo1.setFieldName(resultSet.getString(1).toLowerCase());
|
||||||
@@ -257,24 +257,24 @@ public class DbReadTableUtil {
|
|||||||
throw new Exception("该表不存在或者表中没有字段");
|
throw new Exception("该表不存在或者表中没有字段");
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnVo var7 = new ColumnVo();
|
ColumnVo columnVo = new ColumnVo();
|
||||||
if (com.jero.codegenerate.properties.CodeConfigProperties.k) {
|
if (com.jero.codegenerate.properties.CodeConfigProperties.dbFiledConvert) {
|
||||||
var7.setFieldName(e(resultSet.getString(1).toLowerCase()));
|
columnVo.setFieldName(e(resultSet.getString(1).toLowerCase()));
|
||||||
} else {
|
} else {
|
||||||
var7.setFieldName(resultSet.getString(1).toLowerCase());
|
columnVo.setFieldName(resultSet.getString(1).toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
var7.setFieldDbName(resultSet.getString(1).toUpperCase());
|
columnVo.setFieldDbName(resultSet.getString(1).toUpperCase());
|
||||||
var7.setPrecision(TableConvert.b(resultSet.getString(4)));
|
columnVo.setPrecision(TableConvert.b(resultSet.getString(4)));
|
||||||
var7.setScale(TableConvert.b(resultSet.getString(5)));
|
columnVo.setScale(TableConvert.b(resultSet.getString(5)));
|
||||||
var7.setCharmaxLength(TableConvert.b(resultSet.getString(6)));
|
columnVo.setCharmaxLength(TableConvert.b(resultSet.getString(6)));
|
||||||
var7.setNullable(TableConvert.getNullable(resultSet.getString(7)));
|
columnVo.setNullable(TableConvert.getNullable(resultSet.getString(7)));
|
||||||
var7.setFieldType(a(resultSet.getString(2).toLowerCase(), var7.getPrecision(), var7.getScale()));
|
columnVo.setFieldType(a(resultSet.getString(2).toLowerCase(), columnVo.getPrecision(), columnVo.getScale()));
|
||||||
var7.setFieldDbType(e(resultSet.getString(2).toLowerCase()));
|
columnVo.setFieldDbType(e(resultSet.getString(2).toLowerCase()));
|
||||||
setupColumnVo(var7);
|
setupColumnVo(columnVo);
|
||||||
var7.setFiledComment(StringUtils.isBlank(resultSet.getString(3)) ? var7.getFieldName() : resultSet.getString(3));
|
columnVo.setFiledComment(StringUtils.isBlank(resultSet.getString(3)) ? columnVo.getFieldName() : resultSet.getString(3));
|
||||||
log.debug("columnt.getFieldName() -------------" + var7.getFieldName());
|
log.debug("columnt.getFieldName() -------------" + columnVo.getFieldName());
|
||||||
list.add(var7);
|
list.add(columnVo);
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
if (!resultSet.previous()) {
|
if (!resultSet.previous()) {
|
||||||
@@ -283,7 +283,7 @@ public class DbReadTableUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ColumnVo var8 = new ColumnVo();
|
ColumnVo var8 = new ColumnVo();
|
||||||
if (com.jero.codegenerate.properties.CodeConfigProperties.k) {
|
if (com.jero.codegenerate.properties.CodeConfigProperties.dbFiledConvert) {
|
||||||
var8.setFieldName(e(resultSet.getString(1).toLowerCase()));
|
var8.setFieldName(e(resultSet.getString(1).toLowerCase()));
|
||||||
} else {
|
} else {
|
||||||
var8.setFieldName(resultSet.getString(1).toLowerCase());
|
var8.setFieldName(resultSet.getString(1).toLowerCase());
|
||||||
|
|||||||
+26
-26
@@ -14,8 +14,8 @@ public class CodeConfigProperties {
|
|||||||
|
|
||||||
private static final String dataBaseFileUrl = "jero/jero_database";
|
private static final String dataBaseFileUrl = "jero/jero_database";
|
||||||
private static final String configFileUrl = "jero/jero_config";
|
private static final String configFileUrl = "jero/jero_config";
|
||||||
private static ResourceBundle t = getDatasourcePropties(CodeConfigProperties.dataBaseFileUrl);
|
private static ResourceBundle databaseDatasourcePropties = getDatasourcePropties(CodeConfigProperties.dataBaseFileUrl);
|
||||||
private static ResourceBundle u = getDatasourcePropties(CodeConfigProperties.configFileUrl);
|
private static ResourceBundle configDatasourcePropties = getDatasourcePropties(CodeConfigProperties.configFileUrl);
|
||||||
public static String databaseType;
|
public static String databaseType;
|
||||||
public static String driverName;
|
public static String driverName;
|
||||||
public static String databaseUrl;
|
public static String databaseUrl;
|
||||||
@@ -26,7 +26,7 @@ public class CodeConfigProperties {
|
|||||||
public static String h;
|
public static String h;
|
||||||
public static String i;
|
public static String i;
|
||||||
public static String templateUrl;
|
public static String templateUrl;
|
||||||
public static boolean k;
|
public static boolean dbFiledConvert;
|
||||||
public static String dbTableId;
|
public static String dbTableId;
|
||||||
public static String m;
|
public static String m;
|
||||||
public static String n;
|
public static String n;
|
||||||
@@ -61,64 +61,64 @@ public class CodeConfigProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final String getDriverName() {
|
public static final String getDriverName() {
|
||||||
return t.getString("driver_name");
|
return databaseDatasourcePropties.getString("driver_name");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String getDatabaseUrl() {
|
public static final String getDatabaseUrl() {
|
||||||
return t.getString("url");
|
return databaseDatasourcePropties.getString("url");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String c() {
|
public static final String c() {
|
||||||
return t.getString("username");
|
return databaseDatasourcePropties.getString("username");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String d() {
|
public static final String d() {
|
||||||
return t.getString("password");
|
return databaseDatasourcePropties.getString("password");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String e() {
|
public static final String e() {
|
||||||
return t.getString("database_name");
|
return databaseDatasourcePropties.getString("database_name");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final boolean f() {
|
public static final boolean getDbFiledConvert() {
|
||||||
String var0 = u.getString("db_filed_convert");
|
String dbFiledConvert = configDatasourcePropties.getString("db_filed_convert");
|
||||||
return !var0.toString().equals("false");
|
return !dbFiledConvert.toString().equals("false");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String o() {
|
private static String o() {
|
||||||
return u.getString("bussi_package");
|
return configDatasourcePropties.getString("bussi_package");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getTemplateUrl() {
|
private static String getTemplateUrl() {
|
||||||
return u.getString("template_path");
|
return configDatasourcePropties.getString("template_path");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String g() {
|
public static final String g() {
|
||||||
return u.getString("source_root_package");
|
return configDatasourcePropties.getString("source_root_package");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String h() {
|
public static final String h() {
|
||||||
return u.getString("webroot_package");
|
return configDatasourcePropties.getString("webroot_package");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String getDBTableId() {
|
public static final String getDBTableId() {
|
||||||
return u.getString("db_table_id");
|
return configDatasourcePropties.getString("db_table_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String getPageFilterFields() {
|
public static final String getPageFilterFields() {
|
||||||
return u.getString("page_filter_fields");
|
return configDatasourcePropties.getString("page_filter_fields");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String k() {
|
public static final String k() {
|
||||||
return u.getString("page_search_filed_num");
|
return configDatasourcePropties.getString("page_search_filed_num");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String l() {
|
public static final String l() {
|
||||||
return u.getString("page_field_required_num");
|
return configDatasourcePropties.getString("page_field_required_num");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String m() {
|
public static String m() {
|
||||||
String var0 = u.getString("project_path");
|
String var0 = configDatasourcePropties.getString("project_path");
|
||||||
if (var0 != null && !"".equals(var0)) {
|
if (var0 != null && !"".equals(var0)) {
|
||||||
f = var0;
|
f = var0;
|
||||||
}
|
}
|
||||||
@@ -135,12 +135,12 @@ public class CodeConfigProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
if (t == null) {
|
if (databaseDatasourcePropties == null) {
|
||||||
t = ResourceBundle.getBundle(CodeConfigProperties.dataBaseFileUrl);
|
databaseDatasourcePropties = ResourceBundle.getBundle(CodeConfigProperties.dataBaseFileUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u == null) {
|
if (configDatasourcePropties == null) {
|
||||||
u = ResourceBundle.getBundle(CodeConfigProperties.configFileUrl);
|
configDatasourcePropties = ResourceBundle.getBundle(CodeConfigProperties.configFileUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
databaseType = "mysql";
|
databaseType = "mysql";
|
||||||
@@ -153,7 +153,7 @@ public class CodeConfigProperties {
|
|||||||
h = "src";
|
h = "src";
|
||||||
i = "WebRoot";
|
i = "WebRoot";
|
||||||
templateUrl = "/jero/code-template/";
|
templateUrl = "/jero/code-template/";
|
||||||
k = true;
|
dbFiledConvert = true;
|
||||||
m = "4";
|
m = "4";
|
||||||
n = "3";
|
n = "3";
|
||||||
p = "1";
|
p = "1";
|
||||||
@@ -167,7 +167,7 @@ public class CodeConfigProperties {
|
|||||||
templateUrl = getTemplateUrl();
|
templateUrl = getTemplateUrl();
|
||||||
f = m();
|
f = m();
|
||||||
dbTableId = getDBTableId();
|
dbTableId = getDBTableId();
|
||||||
k = f();
|
dbFiledConvert = getDbFiledConvert();
|
||||||
pageFilterFields = getPageFilterFields();
|
pageFilterFields = getPageFilterFields();
|
||||||
n = k();
|
n = k();
|
||||||
if (databaseUrl.indexOf("mysql") < 0 && databaseUrl.indexOf("MYSQL") < 0) {
|
if (databaseUrl.indexOf("mysql") < 0 && databaseUrl.indexOf("MYSQL") < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user