【fix】对方法和局部变量重新命名

This commit is contained in:
mzc5649
2021-04-01 15:22:46 +08:00
parent 807eb937eb
commit f329447287
2 changed files with 44 additions and 44 deletions
@@ -139,7 +139,7 @@ public class DbReadTableUtil {
}
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()));
} else {
columnVo.setFieldName(resultSet.getString(1).toLowerCase());
@@ -166,7 +166,7 @@ public class DbReadTableUtil {
while(resultSet.previous()) {
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()));
} else {
columnVo1.setFieldName(resultSet.getString(1).toLowerCase());
@@ -257,24 +257,24 @@ public class DbReadTableUtil {
throw new Exception("该表不存在或者表中没有字段");
}
ColumnVo var7 = new ColumnVo();
if (com.jero.codegenerate.properties.CodeConfigProperties.k) {
var7.setFieldName(e(resultSet.getString(1).toLowerCase()));
ColumnVo columnVo = new ColumnVo();
if (com.jero.codegenerate.properties.CodeConfigProperties.dbFiledConvert) {
columnVo.setFieldName(e(resultSet.getString(1).toLowerCase()));
} else {
var7.setFieldName(resultSet.getString(1).toLowerCase());
columnVo.setFieldName(resultSet.getString(1).toLowerCase());
}
var7.setFieldDbName(resultSet.getString(1).toUpperCase());
var7.setPrecision(TableConvert.b(resultSet.getString(4)));
var7.setScale(TableConvert.b(resultSet.getString(5)));
var7.setCharmaxLength(TableConvert.b(resultSet.getString(6)));
var7.setNullable(TableConvert.getNullable(resultSet.getString(7)));
var7.setFieldType(a(resultSet.getString(2).toLowerCase(), var7.getPrecision(), var7.getScale()));
var7.setFieldDbType(e(resultSet.getString(2).toLowerCase()));
setupColumnVo(var7);
var7.setFiledComment(StringUtils.isBlank(resultSet.getString(3)) ? var7.getFieldName() : resultSet.getString(3));
log.debug("columnt.getFieldName() -------------" + var7.getFieldName());
list.add(var7);
columnVo.setFieldDbName(resultSet.getString(1).toUpperCase());
columnVo.setPrecision(TableConvert.b(resultSet.getString(4)));
columnVo.setScale(TableConvert.b(resultSet.getString(5)));
columnVo.setCharmaxLength(TableConvert.b(resultSet.getString(6)));
columnVo.setNullable(TableConvert.getNullable(resultSet.getString(7)));
columnVo.setFieldType(a(resultSet.getString(2).toLowerCase(), columnVo.getPrecision(), columnVo.getScale()));
columnVo.setFieldDbType(e(resultSet.getString(2).toLowerCase()));
setupColumnVo(columnVo);
columnVo.setFiledComment(StringUtils.isBlank(resultSet.getString(3)) ? columnVo.getFieldName() : resultSet.getString(3));
log.debug("columnt.getFieldName() -------------" + columnVo.getFieldName());
list.add(columnVo);
while(true) {
if (!resultSet.previous()) {
@@ -283,7 +283,7 @@ public class DbReadTableUtil {
}
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()));
} else {
var8.setFieldName(resultSet.getString(1).toLowerCase());
@@ -14,8 +14,8 @@ public class CodeConfigProperties {
private static final String dataBaseFileUrl = "jero/jero_database";
private static final String configFileUrl = "jero/jero_config";
private static ResourceBundle t = getDatasourcePropties(CodeConfigProperties.dataBaseFileUrl);
private static ResourceBundle u = getDatasourcePropties(CodeConfigProperties.configFileUrl);
private static ResourceBundle databaseDatasourcePropties = getDatasourcePropties(CodeConfigProperties.dataBaseFileUrl);
private static ResourceBundle configDatasourcePropties = getDatasourcePropties(CodeConfigProperties.configFileUrl);
public static String databaseType;
public static String driverName;
public static String databaseUrl;
@@ -26,7 +26,7 @@ public class CodeConfigProperties {
public static String h;
public static String i;
public static String templateUrl;
public static boolean k;
public static boolean dbFiledConvert;
public static String dbTableId;
public static String m;
public static String n;
@@ -61,64 +61,64 @@ public class CodeConfigProperties {
}
public static final String getDriverName() {
return t.getString("driver_name");
return databaseDatasourcePropties.getString("driver_name");
}
public static final String getDatabaseUrl() {
return t.getString("url");
return databaseDatasourcePropties.getString("url");
}
public static final String c() {
return t.getString("username");
return databaseDatasourcePropties.getString("username");
}
public static final String d() {
return t.getString("password");
return databaseDatasourcePropties.getString("password");
}
public static final String e() {
return t.getString("database_name");
return databaseDatasourcePropties.getString("database_name");
}
public static final boolean f() {
String var0 = u.getString("db_filed_convert");
return !var0.toString().equals("false");
public static final boolean getDbFiledConvert() {
String dbFiledConvert = configDatasourcePropties.getString("db_filed_convert");
return !dbFiledConvert.toString().equals("false");
}
private static String o() {
return u.getString("bussi_package");
return configDatasourcePropties.getString("bussi_package");
}
private static String getTemplateUrl() {
return u.getString("template_path");
return configDatasourcePropties.getString("template_path");
}
public static final String g() {
return u.getString("source_root_package");
return configDatasourcePropties.getString("source_root_package");
}
public static final String h() {
return u.getString("webroot_package");
return configDatasourcePropties.getString("webroot_package");
}
public static final String getDBTableId() {
return u.getString("db_table_id");
return configDatasourcePropties.getString("db_table_id");
}
public static final String getPageFilterFields() {
return u.getString("page_filter_fields");
return configDatasourcePropties.getString("page_filter_fields");
}
public static final String k() {
return u.getString("page_search_filed_num");
return configDatasourcePropties.getString("page_search_filed_num");
}
public static final String l() {
return u.getString("page_field_required_num");
return configDatasourcePropties.getString("page_field_required_num");
}
public static String m() {
String var0 = u.getString("project_path");
String var0 = configDatasourcePropties.getString("project_path");
if (var0 != null && !"".equals(var0)) {
f = var0;
}
@@ -135,12 +135,12 @@ public class CodeConfigProperties {
}
static {
if (t == null) {
t = ResourceBundle.getBundle(CodeConfigProperties.dataBaseFileUrl);
if (databaseDatasourcePropties == null) {
databaseDatasourcePropties = ResourceBundle.getBundle(CodeConfigProperties.dataBaseFileUrl);
}
if (u == null) {
u = ResourceBundle.getBundle(CodeConfigProperties.configFileUrl);
if (configDatasourcePropties == null) {
configDatasourcePropties = ResourceBundle.getBundle(CodeConfigProperties.configFileUrl);
}
databaseType = "mysql";
@@ -153,7 +153,7 @@ public class CodeConfigProperties {
h = "src";
i = "WebRoot";
templateUrl = "/jero/code-template/";
k = true;
dbFiledConvert = true;
m = "4";
n = "3";
p = "1";
@@ -167,7 +167,7 @@ public class CodeConfigProperties {
templateUrl = getTemplateUrl();
f = m();
dbTableId = getDBTableId();
k = f();
dbFiledConvert = getDbFiledConvert();
pageFilterFields = getPageFilterFields();
n = k();
if (databaseUrl.indexOf("mysql") < 0 && databaseUrl.indexOf("MYSQL") < 0) {