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

This commit is contained in:
mzc5649
2021-04-01 16:11:34 +08:00
parent 92e000be61
commit 401a4780e6
3 changed files with 29 additions and 29 deletions
@@ -39,15 +39,15 @@ public class CodeGenerateOne extends BaseCodeGenerate implements IGenerate {
var1.put("tableName", this.tableVo.getTableName());
var1.put("primaryKeyField", com.jero.codegenerate.properties.CodeConfigProperties.dbTableId);
if (this.tableVo.getFieldRequiredNum() == null) {
this.tableVo.setFieldRequiredNum(StringUtils.isNotEmpty(com.jero.codegenerate.properties.CodeConfigProperties.m) ? Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.m) : -1);
this.tableVo.setFieldRequiredNum(StringUtils.isNotEmpty(com.jero.codegenerate.properties.CodeConfigProperties.fieldRequiredNum) ? Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.fieldRequiredNum) : -1);
}
if (this.tableVo.getSearchFieldNum() == null) {
this.tableVo.setSearchFieldNum(StringUtils.isNotEmpty(com.jero.codegenerate.properties.CodeConfigProperties.n) ? Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.n) : -1);
this.tableVo.setSearchFieldNum(StringUtils.isNotEmpty(com.jero.codegenerate.properties.CodeConfigProperties.pageSearchFieldNum) ? Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.pageSearchFieldNum) : -1);
}
if (this.tableVo.getFieldRowNum() == null) {
this.tableVo.setFieldRowNum(Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.p));
this.tableVo.setFieldRowNum(Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.fieldRowNum));
}
var1.put("tableVo", this.tableVo);
@@ -41,26 +41,26 @@ public class CodeGenerateOneToMany extends BaseCodeGenerate implements IGenerate
}
public Map<String, Object> a() throws Exception {
HashMap var1 = new HashMap();
var1.put("bussiPackage", com.jero.codegenerate.properties.CodeConfigProperties.packageName);
var1.put("entityPackage", this.mainTableVo.getEntityPackage());
var1.put("entityName", this.mainTableVo.getEntityName());
var1.put("tableName", this.mainTableVo.getTableName());
var1.put("ftl_description", this.mainTableVo.getFtlDescription());
var1.put("primaryKeyField", com.jero.codegenerate.properties.CodeConfigProperties.dbTableId);
HashMap hashMap = new HashMap();
hashMap.put("bussiPackage", com.jero.codegenerate.properties.CodeConfigProperties.packageName);
hashMap.put("entityPackage", this.mainTableVo.getEntityPackage());
hashMap.put("entityName", this.mainTableVo.getEntityName());
hashMap.put("tableName", this.mainTableVo.getTableName());
hashMap.put("ftl_description", this.mainTableVo.getFtlDescription());
hashMap.put("primaryKeyField", com.jero.codegenerate.properties.CodeConfigProperties.dbTableId);
if (this.mainTableVo.getFieldRequiredNum() == null) {
this.mainTableVo.setFieldRequiredNum(StringUtils.isNotEmpty(com.jero.codegenerate.properties.CodeConfigProperties.m) ? Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.m) : -1);
this.mainTableVo.setFieldRequiredNum(StringUtils.isNotEmpty(com.jero.codegenerate.properties.CodeConfigProperties.fieldRequiredNum) ? Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.fieldRequiredNum) : -1);
}
if (this.mainTableVo.getSearchFieldNum() == null) {
this.mainTableVo.setSearchFieldNum(StringUtils.isNotEmpty(com.jero.codegenerate.properties.CodeConfigProperties.n) ? Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.n) : -1);
this.mainTableVo.setSearchFieldNum(StringUtils.isNotEmpty(com.jero.codegenerate.properties.CodeConfigProperties.pageSearchFieldNum) ? Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.pageSearchFieldNum) : -1);
}
if (this.mainTableVo.getFieldRowNum() == null) {
this.mainTableVo.setFieldRowNum(Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.p));
this.mainTableVo.setFieldRowNum(Integer.parseInt(com.jero.codegenerate.properties.CodeConfigProperties.fieldRowNum));
}
var1.put("tableVo", this.mainTableVo);
hashMap.put("tableVo", this.mainTableVo);
try {
if (this.mainColumns == null || this.mainColumns.size() == 0) {
@@ -71,14 +71,14 @@ public class CodeGenerateOneToMany extends BaseCodeGenerate implements IGenerate
this.originalMainColumns = DbReadTableUtil.listOriginalColumns(this.mainTableVo.getTableName());
}
var1.put("columns", this.mainColumns);
var1.put("originalColumns", this.originalMainColumns);
hashMap.put("columns", this.mainColumns);
hashMap.put("originalColumns", this.originalMainColumns);
Iterator iterator = this.originalMainColumns.iterator();
while(iterator.hasNext()) {
ColumnVo var3 = (ColumnVo)iterator.next();
if (var3.getFieldName().toLowerCase().equals(com.jero.codegenerate.properties.CodeConfigProperties.dbTableId.toLowerCase())) {
var1.put("primaryKeyPolicy", var3.getFieldType());
hashMap.put("primaryKeyPolicy", var3.getFieldType());
}
}
@@ -111,15 +111,15 @@ public class CodeGenerateOneToMany extends BaseCodeGenerate implements IGenerate
subTableVo.setOriginalForeignKeys(var13);
}
var1.put("subTables", this.j);
hashMap.put("subTables", this.j);
} catch (Exception var10) {
throw var10;
}
long var11 = NonceUtils.c() + NonceUtils.g();
var1.put("serialVersionUID", String.valueOf(var11));
log.info("code template data: " + var1.toString());
return var1;
hashMap.put("serialVersionUID", String.valueOf(var11));
log.info("code template data: " + hashMap.toString());
return hashMap;
}
public List<String> generateCodeFile(String stylePath) throws Exception {
@@ -28,10 +28,10 @@ public class CodeConfigProperties {
public static String templateUrl;
public static boolean dbFiledConvert;
public static String dbTableId;
public static String m;
public static String n;
public static String fieldRequiredNum;
public static String pageSearchFieldNum;
public static String pageFilterFields;
public static String p;
public static String fieldRowNum;
private static ResourceBundle getDatasourcePropties(String var0) {
PropertyResourceBundle var1 = null;
@@ -109,7 +109,7 @@ public class CodeConfigProperties {
return configDatasourcePropties.getString("page_filter_fields");
}
public static final String k() {
public static final String getPageSearchFieldNum() {
return configDatasourcePropties.getString("page_search_filed_num");
}
@@ -154,9 +154,9 @@ public class CodeConfigProperties {
i = "WebRoot";
templateUrl = "/jero/code-template/";
dbFiledConvert = true;
m = "4";
n = "3";
p = "1";
fieldRequiredNum = "4";
pageSearchFieldNum = "3";
fieldRowNum = "1";
driverName = getDriverName();
databaseUrl = getDatabaseUrl();
username = c();
@@ -169,7 +169,7 @@ public class CodeConfigProperties {
dbTableId = getDBTableId();
dbFiledConvert = getDbFiledConvert();
pageFilterFields = getPageFilterFields();
n = k();
pageSearchFieldNum = getPageSearchFieldNum();
if (databaseUrl.indexOf("mysql") < 0 && databaseUrl.indexOf("MYSQL") < 0) {
if (databaseUrl.indexOf("oracle") < 0 && databaseUrl.indexOf("ORACLE") < 0) {
if (databaseUrl.indexOf("postgresql") < 0 && databaseUrl.indexOf("POSTGRESQL") < 0) {