fix 代码生成导入业务名截取bug
This commit is contained in:
parent
013264da73
commit
1e1a80b1a7
@ -278,9 +278,10 @@ namespace ZR.CodeGenerator
|
|||||||
/// <returns>业务名</returns>
|
/// <returns>业务名</returns>
|
||||||
public static string GetBusinessName(string tableName)
|
public static string GetBusinessName(string tableName)
|
||||||
{
|
{
|
||||||
int lastIndex = tableName.LastIndexOf("_");
|
int lastIndex = tableName.LastIndexOf("_");//_前缀长度
|
||||||
int nameLength = tableName.Length;
|
int nameLength = tableName.Length;
|
||||||
string businessName = tableName[(nameLength - lastIndex + 1)..];
|
int subLength = (nameLength - lastIndex) - 1;
|
||||||
|
string businessName = tableName[(lastIndex + 1)..];// tableName.Substring(lastIndex + 1, subLength);
|
||||||
return businessName.ToLower();
|
return businessName.ToLower();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user