diff --git a/ZR.Admin.WebApi/Startup.cs b/ZR.Admin.WebApi/Startup.cs index 1d1340f..1d568c1 100644 --- a/ZR.Admin.WebApi/Startup.cs +++ b/ZR.Admin.WebApi/Startup.cs @@ -1,6 +1,7 @@ using Hei.Captcha; using Infrastructure; using Infrastructure.Extensions; +using JinianNet.JNTemplate; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.DataProtection; @@ -84,6 +85,14 @@ namespace ZR.Admin.WebApi c.IncludeXmlComments("ZRAdmin.xml", true); } }); + + //jntģȫֱ + Engine.Configure((options) => + { + options.Data.Set("author", Configuration["gen:author"]); + options.Data.Set("time", DateTime.Now.ToString("yyyy-MM-dd")); + //... + }); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/InputDtoTemplate.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/InputDtoTemplate.txt index ded802d..e44f353 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/InputDtoTemplate.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/InputDtoTemplate.txt @@ -1,24 +1,24 @@ using System; using System.Collections.Generic; -using {ModelsNamespace}.Dto; -using {ModelsNamespace}.Models; +using ${ModelsNamespace}.Dto; +using ${ModelsNamespace}.Models; -namespace {DtosNamespace}.Dto +namespace ${DtosNamespace}.Dto { /// - /// {FunctionName}输入对象模型 + /// ${FunctionName}输入对象模型 /// - public class {ModelTypeName}Dto + public class ${ModelTypeName}Dto { -{PropertyName} +${PropertyName} } /// - /// {FunctionName}查询对象模型 + /// ${FunctionName}查询对象模型 /// - public class {ModelTypeName}QueryDto: PagerInfo + public class ${ModelTypeName}QueryDto: PagerInfo { -{QueryProperty} +${QueryProperty} public DateTime? BeginTime { get; set; } public DateTime? EndTime { get; set; } } diff --git a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/VueTemplate.txt b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/VueTemplate.txt index 59dfa9f..d9cac95 100644 --- a/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/VueTemplate.txt +++ b/ZR.Admin.WebApi/wwwroot/CodeGenTemplate/VueTemplate.txt @@ -2,7 +2,7 @@
-{vueQueryFormHtml} +${vueQueryFormHtml} 搜索 重置 @@ -12,13 +12,13 @@ - 新增 + 新增 - 修改 + 修改 - 删除 + 删除 @@ -26,12 +26,12 @@ -{VueViewListContent} +${VueViewListContent} @@ -42,7 +42,7 @@ -{VueViewFormContent} +${VueViewFormContent}