😎修复代码生成种子数据模板
This commit is contained in:
parent
81006dde67
commit
018f121d5e
@ -27,7 +27,6 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Admin.NET.Core\Admin.NET.Core.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.GoView\Admin.NET.Plugin.GoView.csproj" />
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.ReZero\Admin.NET.Plugin.ReZero.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -20,10 +20,10 @@ public class @(Model.SeedDataName): ISqlSugarEntitySeedData<@(Model.EntityName)>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<@(Model.EntityName)> HasData()
|
||||
{
|
||||
string recordsJSON = @@"
|
||||
@(Model.RecordsJSON.Replace("\"","\"\"").Replace("\n", "\n\t\t\t"))
|
||||
string recordList = @@"
|
||||
@(Model.RecordList.Replace("\"","\"\"").Replace("\n", "\n\t\t\t"))
|
||||
";
|
||||
List<@(Model.EntityName)> records = Newtonsoft.Json.JsonConvert.DeserializeObject<List<@(Model.EntityName)>>(recordsJSON);
|
||||
List<@(Model.EntityName)> records = Newtonsoft.Json.JsonConvert.DeserializeObject<List<@(Model.EntityName)>>(recordList);
|
||||
@if (Model.JsonIgnoreInfo.Count>0) {
|
||||
@:
|
||||
@:#region 处理 JsonIgnore 的Property
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2024.12.05",
|
||||
"lastBuildTime": "2024.12.06",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -74,7 +74,7 @@
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.3.17",
|
||||
"vxe-pc-ui": "^4.3.18",
|
||||
"vxe-table": "^4.8.10",
|
||||
"vxe-table-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.7",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user