😎修复种子数据模板

This commit is contained in:
zuohuaijun 2024-12-06 12:29:08 +08:00
parent bcd0c1b014
commit 020fc85561
2 changed files with 2 additions and 2 deletions

View File

@ -475,7 +475,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient
input.SeedDataName, input.SeedDataName,
input.ConfigId, input.ConfigId,
tableInfo.Description, tableInfo.Description,
// JsonIgnoreInfo = jsonIgnoreInfo, JsonIgnoreInfo = new List<List<JsonIgnoredPropertyData>>(),
RecordList = JSON.Serialize(recordList) RecordList = JSON.Serialize(recordList)
}; };
var tResult = await _viewEngine.RunCompileAsync(tContent, data, builderAction: builder => var tResult = await _viewEngine.RunCompileAsync(tContent, data, builderAction: builder =>

View File

@ -24,7 +24,7 @@ public class @(Model.SeedDataName): ISqlSugarEntitySeedData<@(Model.EntityName)>
@(Model.RecordList.Replace("\"","\"\"").Replace("\n", "\n\t\t\t")) @(Model.RecordList.Replace("\"","\"\"").Replace("\n", "\n\t\t\t"))
"; ";
List<@(Model.EntityName)> records = Newtonsoft.Json.JsonConvert.DeserializeObject<List<@(Model.EntityName)>>(recordList); List<@(Model.EntityName)> records = Newtonsoft.Json.JsonConvert.DeserializeObject<List<@(Model.EntityName)>>(recordList);
@if (Model.JsonIgnoreInfo.Count>0) { @if (Model.JsonIgnoreInfo.Count > 0) {
@: @:
@:#region 处理 JsonIgnore 的Property @:#region 处理 JsonIgnore 的Property
@: @: