chore: 😀规范扩展方法命名

This commit is contained in:
喵你个旺呀 2025-01-17 12:35:58 +08:00
parent 98930a4add
commit f1820cb302
2 changed files with 10 additions and 10 deletions

View File

@ -90,7 +90,7 @@ public static class StringExtension
/// <summary>
/// 转首字母小写
/// </summary>
public static string ToFirstLower(this string input)
public static string ToFirstLetterLowerCase(this string input)
{
if (string.IsNullOrWhiteSpace(input)) return input;
if (input.Length == 1) return input.ToLower(); // 处理单字符字符串

View File

@ -439,7 +439,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
string targetFile = templateList[i].OutputFile
.Replace("{PagePath}", input.PagePath)
.Replace("{TableName}", input.TableName)
.Replace("{TableNameLower}", input.TableName?.ToFirstLower() ?? "");
.Replace("{TableNameLower}", input.TableName?.ToFirstLetterLowerCase() ?? "");
string tmpPath;
if (!input.GenerateType.StartsWith('1'))
@ -564,20 +564,20 @@ public class SysCodeGenService : IDynamicApiController, ITransient
IsApiService = input.IsApiService,
RemoteVerify = tableFieldList.Any(t => t.RemoteVerify), // 远程验证
TreeName = input.TreeName,
LowerTreeName = input.TreeName?.ToFirstLower() ?? "", // 首字母小写
LowerTreeName = input.TreeName?.ToFirstLetterLowerCase() ?? "", // 首字母小写
LeftTab = input.LeftTab,
LeftKey = input.LeftKey!,
LeftPrimaryKey = input.LeftPrimaryKey,
LeftName = input.LeftName,
LowerLeftTab = input.LeftTab?.ToFirstLower() ?? "", // 首字母小写
LowerLeftKey = input.LeftKey?.ToFirstLower() ?? "", // 首字母小写
LowerLeftPrimaryKey = input.LeftPrimaryKey?.ToFirstLower() ?? "", // 首字母小写
LowerLeftTab = input.LeftTab?.ToFirstLetterLowerCase() ?? "", // 首字母小写
LowerLeftKey = input.LeftKey?.ToFirstLetterLowerCase() ?? "", // 首字母小写
LowerLeftPrimaryKey = input.LeftPrimaryKey?.ToFirstLetterLowerCase() ?? "", // 首字母小写
BottomTab = input.BottomTab,
BottomKey = input.BottomKey!,
BottomPrimaryKey = input.BottomPrimaryKey,
LowerBottomTab = input.BottomTab?.ToFirstLower() ?? "", // 首字母小写
LowerBottomKey = input.BottomKey?.ToFirstLower() ?? "", // 首字母小写
LowerBottomPrimaryKey = input.BottomPrimaryKey?.ToFirstLower() ?? "", // 首字母小写
LowerBottomTab = input.BottomTab?.ToFirstLetterLowerCase() ?? "", // 首字母小写
LowerBottomKey = input.BottomKey?.ToFirstLetterLowerCase() ?? "", // 首字母小写
LowerBottomPrimaryKey = input.BottomPrimaryKey?.ToFirstLetterLowerCase() ?? "", // 首字母小写
};
}
@ -739,7 +739,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
long tempPid = pid;
var menuList = new List<SysMenu>();
var classNameLower = className.ToLower();
var classNameFirstLower = className.ToFirstLower();
var classNameFirstLower = className.ToFirstLetterLowerCase();
if (pid == 0)
{
// 目录