代码生成导入业务名下划线转驼峰
This commit is contained in:
parent
fe2a1c792b
commit
b3f97549b2
@ -268,16 +268,6 @@ namespace ZR.CodeGenerator
|
||||
return tableName.Substring(0, 1).ToUpper() + tableName[1..].Replace("_", "");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取业务名
|
||||
/// </summary>
|
||||
/// <param name="tableName">tableName 表名</param>
|
||||
/// <returns>业务名</returns>
|
||||
public static string GetBusinessName(string tableName)
|
||||
{
|
||||
return tableName.Substring(0, 1).ToUpper() + tableName[1..].Replace("_", "");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 首字母转小写,输出前端
|
||||
/// </summary>
|
||||
@ -356,7 +346,7 @@ namespace ZR.CodeGenerator
|
||||
BaseNameSpace = "ZR.",//导入默认命名空间前缀
|
||||
ModuleName = "business",//导入默认模块名
|
||||
ClassName = GetClassName(tableName),
|
||||
BusinessName = GetBusinessName(tableName),
|
||||
BusinessName = FirstUpperCase(tableName.UnderScoreToCamelCase()),
|
||||
FunctionAuthor = ConfigUtils.Instance.GetConfig(GenConstants.Gen_author),
|
||||
TableName = tableName,
|
||||
TableComment = desc,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user