代码生成导入业务名下划线转驼峰
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("_", "");
|
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>
|
||||||
/// 首字母转小写,输出前端
|
/// 首字母转小写,输出前端
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -356,7 +346,7 @@ namespace ZR.CodeGenerator
|
|||||||
BaseNameSpace = "ZR.",//导入默认命名空间前缀
|
BaseNameSpace = "ZR.",//导入默认命名空间前缀
|
||||||
ModuleName = "business",//导入默认模块名
|
ModuleName = "business",//导入默认模块名
|
||||||
ClassName = GetClassName(tableName),
|
ClassName = GetClassName(tableName),
|
||||||
BusinessName = GetBusinessName(tableName),
|
BusinessName = FirstUpperCase(tableName.UnderScoreToCamelCase()),
|
||||||
FunctionAuthor = ConfigUtils.Instance.GetConfig(GenConstants.Gen_author),
|
FunctionAuthor = ConfigUtils.Instance.GetConfig(GenConstants.Gen_author),
|
||||||
TableName = tableName,
|
TableName = tableName,
|
||||||
TableComment = desc,
|
TableComment = desc,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user