优化代码

This commit is contained in:
RuoYi
2022-02-12 21:23:07 +08:00
parent 2f4c975615
commit 0086cc9f53
26 changed files with 44 additions and 65 deletions

View File

@ -146,8 +146,7 @@ public class GenUtils
{
int lastIndex = packageName.lastIndexOf(".");
int nameLength = packageName.length();
String moduleName = StringUtils.substring(packageName, lastIndex + 1, nameLength);
return moduleName;
return StringUtils.substring(packageName, lastIndex + 1, nameLength);
}
/**
@ -160,8 +159,7 @@ public class GenUtils
{
int lastIndex = tableName.lastIndexOf("_");
int nameLength = tableName.length();
String businessName = StringUtils.substring(tableName, lastIndex + 1, nameLength);
return businessName;
return StringUtils.substring(tableName, lastIndex + 1, nameLength);
}
/**
@ -250,4 +248,4 @@ public class GenUtils
return 0;
}
}
}
}

View File

@ -249,8 +249,7 @@ public class VelocityUtils
public static String getPackagePrefix(String packageName)
{
int lastIndex = packageName.lastIndexOf(".");
String basePackage = StringUtils.substring(packageName, 0, lastIndex);
return basePackage;
return StringUtils.substring(packageName, 0, lastIndex);
}
/**
@ -298,7 +297,7 @@ public class VelocityUtils
/**
* 获取上级菜单ID字段
*
* @param options 生成其他选项
* @param paramsObj 生成其他选项
* @return 上级菜单ID字段
*/
public static String getParentMenuId(JSONObject paramsObj)
@ -314,7 +313,7 @@ public class VelocityUtils
/**
* 获取树编码
*
* @param options 生成其他选项
* @param paramsObj 生成其他选项
* @return 树编码
*/
public static String getTreecode(JSONObject paramsObj)
@ -329,7 +328,7 @@ public class VelocityUtils
/**
* 获取树父编码
*
* @param options 生成其他选项
* @param paramsObj 生成其他选项
* @return 树父编码
*/
public static String getTreeParentCode(JSONObject paramsObj)
@ -344,7 +343,7 @@ public class VelocityUtils
/**
* 获取树名称
*
* @param options 生成其他选项
* @param paramsObj 生成其他选项
* @return 树名称
*/
public static String getTreeName(JSONObject paramsObj)
@ -382,4 +381,4 @@ public class VelocityUtils
}
return num;
}
}
}