mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
fix {ForeignKeyTemplate}存在无法生成的问题
This commit is contained in:
parent
4f37560dc8
commit
8fb9297145
@ -308,6 +308,11 @@ namespace OpenAuth.App
|
||||
domainContent = domainContent
|
||||
.Replace("{ForeignKeyTemplate}", foreignTemplate);
|
||||
}
|
||||
else
|
||||
{
|
||||
domainContent = domainContent
|
||||
.Replace("{ForeignKeyTemplate}", "");
|
||||
}
|
||||
|
||||
var primarykey = sysColumns.FirstOrDefault(u => u.IsKey);
|
||||
if (primarykey == null)
|
||||
@ -359,6 +364,11 @@ namespace OpenAuth.App
|
||||
domainContent = domainContent
|
||||
.Replace("{ForeignKeyTemplate}", foreignTemplate);
|
||||
}
|
||||
else
|
||||
{
|
||||
domainContent = domainContent
|
||||
.Replace("{ForeignKeyTemplate}", "");
|
||||
}
|
||||
|
||||
FileHelper.WriteFile(Path.Combine(appRootPath, $"{sysTableInfo.ModuleCode}\\Request"), $"Query{sysTableInfo.ClassName}ListReq.cs",
|
||||
domainContent);
|
||||
|
@ -29,7 +29,7 @@ namespace OpenAuth.App
|
||||
var columnFields = loginContext.GetTableColumns("{ClassName}");
|
||||
if (columnFields == null || columnFields.Count == 0)
|
||||
{
|
||||
throw new Exception("请在代码生成界面配置Resource表的字段属性");
|
||||
throw new Exception("请在代码生成界面配置{ClassName}表的字段属性");
|
||||
}
|
||||
|
||||
var result = new TableData();
|
||||
|
Loading…
Reference in New Issue
Block a user