chore: 😀规范扩展方法命名
This commit is contained in:
parent
98930a4add
commit
f1820cb302
@ -90,7 +90,7 @@ public static class StringExtension
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 转首字母小写
|
/// 转首字母小写
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ToFirstLower(this string input)
|
public static string ToFirstLetterLowerCase(this string input)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(input)) return input;
|
if (string.IsNullOrWhiteSpace(input)) return input;
|
||||||
if (input.Length == 1) return input.ToLower(); // 处理单字符字符串
|
if (input.Length == 1) return input.ToLower(); // 处理单字符字符串
|
||||||
|
|||||||
@ -439,7 +439,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
|
|||||||
string targetFile = templateList[i].OutputFile
|
string targetFile = templateList[i].OutputFile
|
||||||
.Replace("{PagePath}", input.PagePath)
|
.Replace("{PagePath}", input.PagePath)
|
||||||
.Replace("{TableName}", input.TableName)
|
.Replace("{TableName}", input.TableName)
|
||||||
.Replace("{TableNameLower}", input.TableName?.ToFirstLower() ?? "");
|
.Replace("{TableNameLower}", input.TableName?.ToFirstLetterLowerCase() ?? "");
|
||||||
|
|
||||||
string tmpPath;
|
string tmpPath;
|
||||||
if (!input.GenerateType.StartsWith('1'))
|
if (!input.GenerateType.StartsWith('1'))
|
||||||
@ -564,20 +564,20 @@ public class SysCodeGenService : IDynamicApiController, ITransient
|
|||||||
IsApiService = input.IsApiService,
|
IsApiService = input.IsApiService,
|
||||||
RemoteVerify = tableFieldList.Any(t => t.RemoteVerify), // 远程验证
|
RemoteVerify = tableFieldList.Any(t => t.RemoteVerify), // 远程验证
|
||||||
TreeName = input.TreeName,
|
TreeName = input.TreeName,
|
||||||
LowerTreeName = input.TreeName?.ToFirstLower() ?? "", // 首字母小写
|
LowerTreeName = input.TreeName?.ToFirstLetterLowerCase() ?? "", // 首字母小写
|
||||||
LeftTab = input.LeftTab,
|
LeftTab = input.LeftTab,
|
||||||
LeftKey = input.LeftKey!,
|
LeftKey = input.LeftKey!,
|
||||||
LeftPrimaryKey = input.LeftPrimaryKey,
|
LeftPrimaryKey = input.LeftPrimaryKey,
|
||||||
LeftName = input.LeftName,
|
LeftName = input.LeftName,
|
||||||
LowerLeftTab = input.LeftTab?.ToFirstLower() ?? "", // 首字母小写
|
LowerLeftTab = input.LeftTab?.ToFirstLetterLowerCase() ?? "", // 首字母小写
|
||||||
LowerLeftKey = input.LeftKey?.ToFirstLower() ?? "", // 首字母小写
|
LowerLeftKey = input.LeftKey?.ToFirstLetterLowerCase() ?? "", // 首字母小写
|
||||||
LowerLeftPrimaryKey = input.LeftPrimaryKey?.ToFirstLower() ?? "", // 首字母小写
|
LowerLeftPrimaryKey = input.LeftPrimaryKey?.ToFirstLetterLowerCase() ?? "", // 首字母小写
|
||||||
BottomTab = input.BottomTab,
|
BottomTab = input.BottomTab,
|
||||||
BottomKey = input.BottomKey!,
|
BottomKey = input.BottomKey!,
|
||||||
BottomPrimaryKey = input.BottomPrimaryKey,
|
BottomPrimaryKey = input.BottomPrimaryKey,
|
||||||
LowerBottomTab = input.BottomTab?.ToFirstLower() ?? "", // 首字母小写
|
LowerBottomTab = input.BottomTab?.ToFirstLetterLowerCase() ?? "", // 首字母小写
|
||||||
LowerBottomKey = input.BottomKey?.ToFirstLower() ?? "", // 首字母小写
|
LowerBottomKey = input.BottomKey?.ToFirstLetterLowerCase() ?? "", // 首字母小写
|
||||||
LowerBottomPrimaryKey = input.BottomPrimaryKey?.ToFirstLower() ?? "", // 首字母小写
|
LowerBottomPrimaryKey = input.BottomPrimaryKey?.ToFirstLetterLowerCase() ?? "", // 首字母小写
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -739,7 +739,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
|
|||||||
long tempPid = pid;
|
long tempPid = pid;
|
||||||
var menuList = new List<SysMenu>();
|
var menuList = new List<SysMenu>();
|
||||||
var classNameLower = className.ToLower();
|
var classNameLower = className.ToLower();
|
||||||
var classNameFirstLower = className.ToFirstLower();
|
var classNameFirstLower = className.ToFirstLetterLowerCase();
|
||||||
if (pid == 0)
|
if (pid == 0)
|
||||||
{
|
{
|
||||||
// 目录
|
// 目录
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user