修复 生成器业务名 只会截取表下划线的最后一个 导致很多controller 会重名 问题

This commit is contained in:
疯狂的狮子li 2020-07-16 13:14:01 +08:00
parent a3a3d62034
commit e85334bacd
1 changed files with 2 additions and 2 deletions

View File

@ -147,10 +147,10 @@ public class GenUtils
*/ */
public static String getBusinessName(String tableName) public static String getBusinessName(String tableName)
{ {
int lastIndex = tableName.lastIndexOf("_"); int lastIndex = tableName.indexOf("_");
int nameLength = tableName.length(); int nameLength = tableName.length();
String businessName = StringUtils.substring(tableName, lastIndex + 1, nameLength); String businessName = StringUtils.substring(tableName, lastIndex + 1, nameLength);
return businessName; return StringUtils.toCamelCase(businessName);
} }
/** /**